Question

On my Linux box running Ubuntu 12.04LTS I am able to mount a share using cifs.

The shared folder in question is located at a Mac Pro running Mavericks.

Here is the fstab on the Ubuntu/Linux box.

//132.13.6.5/Data /home/sro/Mount cifs username=sro,password=psw,nounix,sec=ntlmssp,rw

/Mount on the Linux box has these permissions:

drwxr-xr-x 21 root    root          0 Jan 16 13:29 Mount

I can read /Mount/Data but not write (I get a permission error).

I think this is because /Mount is created by root and I am trying this a user.

But I am unable to change /Mount permissions or ownership even using sudo.

On the Mac/Mavericks side, /Data has read/write permissions.

Any ideas how to solve this?

Was it helpful?

Solution

The issue here was a missing UID/GID pair. Apparently when those are absent the default owner of the share will be root.

So my fstab line should look like this:

//132.13.6.5/Data /home/sro/Mount cifs username=sro,password=psw,nounix,sec=ntlmssp,rw,uid=1001,gid=1001

Two things:

  • your UID/GID may not be 1001 so better check with the id command first
  • you may want to use permission masks as detailed here.

OTHER TIPS

add to your fstab line uid=your_user_name your line will be:

//132.13.6.5/Data /home/sro/Mount cifs username=sro,password=psw,nounix,sec=ntlmssp,rw,uid=your_user_name

That way you are asking linux to set that user as owner of filesystem being mounted.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top