Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Getting File permissions right on a network drive

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
sd_read
Posts: 14
Joined: 2014-11-20 23:49

Getting File permissions right on a network drive

#1 Post by sd_read »

Hello, I am having problems with setting up permissions that I cannot seem to figure out even after exhaustive googling.

The problem is when I save photos from the camera to the network drive my Wife is not able to edit or create new files in that directory.

Here is my setup.

I have a Debian server with nfs running on it.

And on this server I have a second drive mounted as /mnt/bigdiskc.

I then export this entire disk on the server with the following entry in the /etc/exports file:

Code: Select all

 /mnt/bigdiskc 192.168.0.0/24(rw,sync,fsid=0,no_subtree_check)
Next, from my desktop client running Linux Mint and I have the following entry in my /etc/fstab file:

Code: Select all

192.168.0.6:/mnt/bigdiskc/Photos /mnt/photos nfs   rw,async,hard,intr 0 0
Where 192.168.0.6 is the server I mentioned above.

So on my client, Linux Mint desktop the above fstab entry mounts the Photos directory to:

Code: Select all

/mnt/photos
From my desktop I browse over to /mnt/photos/ where I create a new directory called “Test”.

Now I ssh into my server to look at the permissions for the directory I just created:

Code: Select all

4 drwxr-xr-x 2 steve users 4096 Sep 14 18:53 Test
The issue is that the group “users”. I can’t figure out why it only has read and execute rights.

How do I set it up so that when I created directories or save or copy files to this network disk it will not only give the owner (steve in this case) full rights but the group “users” as well.

Some more information, if I ssh into the server from the command shell as steve and then execute:

Code: Select all

mkdir Test2 
in the same directory it works as I expect:

Code: Select all

4 drwxrwxr-x 2 steve users 4096 Sep 14 19:03 Test2
So this seems to be an issue with exporting the directory and mapping it to the client.

Also, my UID is the same for the server and client as well as GID.

This is a real pain as every time I copy camera photos over to the network drive I have to ssh into the server to change permissions for the group “user” so that my Wife can work with them.

Thank you for your help.

sd_read
Posts: 14
Joined: 2014-11-20 23:49

Re: Getting File permissions right on a network drive

#2 Post by sd_read »

No one can help me?

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1400
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 79 times
Been thanked: 175 times

Re: Getting File permissions right on a network drive

#3 Post by steve_v »

What's your umask? same on the server and client?
If it's the default 022 on the client, those drwxr-xr-x permissions are what I would expect. I'm dubious as to NFS being the problem...

If the problem is the umask you'll have to set it in e.g. ~/.profile as NFS doesn't appear to support it per-mount. This will set the default for all new files created by the user.
A more refined approach might be to use ACLs on a per-directory basis, something like this.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

sd_read
Posts: 14
Joined: 2014-11-20 23:49

Re: Getting File permissions right on a network drive - SOLV

#4 Post by sd_read »

Yes, thank you, it was the umask.

On the server it was 0002 but on my client it was 0022 so I changed the ./profile as you suggested on my client, rebooted and now it works.

Thank you for your help.

User avatar
Gaius
Posts: 33
Joined: 2012-12-18 10:54
Location: Germany

Re: Getting File permissions right on a network drive

#5 Post by Gaius »

@ sd_read:

Renaming the OP to
[SOLVED] Getting File Permissions.....
will let other users who encounter the same problem know that a solution may be found in this thread.
:)

Cheers,
Gaius
If you can’t explain it simply, you don’t understand it well enough.
Albert Einstein

Post Reply