Xfce Forum

Sub domains
 

You are not logged in.

#1 2018-07-19 12:03:05

Von_Zipper
Member
Registered: 2006-01-10
Posts: 29

Thunar - bug or feature?

NFS mount. I own the file and have write permission on it. I can use cp command to overwrite it with new version for instance. But Thunar refuses to access it for writing. Probably because the parent directory is not owned by my user and user has no rights to create new files. Shall I file a bug?

Offline

#2 2018-07-19 17:00:01

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Thunar - bug or feature?

If you close and re-open thunar, are you then able to write to the nfs mount through thunar?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2018-07-19 20:02:27

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Thunar - bug or feature?

Sounds like you don't have the right permissions on your nfs mount. What does the following return:

getfacl /nfs/dir

...where "/nfs/dir" is the directory that you are trying to copy to.

Also:

getfacl /nfs/dir/file

...where "/nfs/dir/file" is the file that you are overwriting.

How are you mounting the nfs share? What command are you using?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#4 2018-07-19 20:04:28

Von_Zipper
Member
Registered: 2006-01-10
Posts: 29

Re: Thunar - bug or feature?

$ su (or sudo -s)
# mkdir testdir
# touch testdir/testfile
# chown <user> testdir/testfile
# ^d
$ touch testfile
$ cp testfile testdir/testfile

Works from command line.
Thunar refuses to overwrite the file. Try for yourself.

Offline

#5 2018-07-19 20:22:18

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Thunar - bug or feature?

But you su first. That changes your UID. Are you running thunar with su/sudo/gksudo/pkexec as well?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#6 2018-07-19 21:32:19

Von_Zipper
Member
Registered: 2006-01-10
Posts: 29

Re: Thunar - bug or feature?

You are missing the point. The file is owned by me. I'm not running cp command as superuser and it works.

Offline

#7 2018-07-20 11:53:26

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Thunar - bug or feature?

Sorry, missed the fact that you left su. It still looks like a permissions issue.

On my server, here is my /etc/exportfs:

/data/mp3	192.168.1.0/24(rw,no_subtree_check,no_root_squash,anongid=1003)

The important part is the "anongid=1003" part. It sets the group to 1003 which on my client machine is mapped to "nfsshare" and my current user is a member of that group:

$ cat /etc/group | grep nfsshare
nfsshare:x:1003:toz

On the client machine:

$ sudo mount -t nfs 192.168.1.240:/data/mp3 /mnt/oc
$ getfacl /mnt/oc/
getfacl: Removing leading '/' from absolute path names
# file: mnt/oc/
# owner: root
# group: nfsshare
# flags: -s-
user::rwx
group::rwx
other::r-x

Note that the group for the mounted directory is "nfsshare" and that it has full access to the share. And since I am a member of that group, I will have full access.

Now both cp and thunar work for me when run as a normal user.

Can you post back the following:

  1. The version of Thunar you are using

  2. how do you mount the share? via the mount command or thunar built-in connection (which uses gvfs)

  3. your nfs server's /etc/exports file

  4. the results of the getfacl command against your mounted directory?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#8 2018-07-21 11:41:25

Von_Zipper
Member
Registered: 2006-01-10
Posts: 29

Re: Thunar - bug or feature?

Lets forget NFS, in my example I created a directory in my home and Thunar refuses to overwrite a file owned by me - obviously because of permissions of parent directory. Sorry for involving NFS (but that's where it bites me). Thunar version 1.8.1.

Offline

#9 2018-07-21 13:39:30

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Thunar - bug or feature?

Yeah, looks like I was too focused on the NFS thing. My apologies.

I can see what you are seeing now. Based on the fact that as regular user you don't have access to that directory, you shouldn't be able to see what is in the directory. In other words, I'm surprised that "cp" lets you do that. So I did some research and found this post (and a follow-on article). Note Baldrick's "Interesting case 2" response and the article's 4th example. Interesting.

So yes, probably a bug in thunar (or maybe GIO).


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#10 2018-07-22 08:26:48

Von_Zipper
Member
Registered: 2006-01-10
Posts: 29

Re: Thunar - bug or feature?

I don't think "have no access" is correct wording. User can cd into this directory and read its contents. This is access, although limited. Other shells do not have this bug, for instance Midnight Commander and XFE file manager allow me overwrite or delete files owned by me.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.009 seconds, 7 queries executed - Memory usage: 574.05 KiB (Peak: 590.9 KiB) ]