Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Samba vs CIFS - permissions

Status
Not open for further replies.

adamroper

Programmer
Dec 19, 2005
4
GB
Hi guys,

Firstly I'll describe the environment: Basically I have a linux box acting as a CVS server, and the repository is on a remote Windows machine (XP or 2003) for IT reasons :-$

Anyway when I mount the partition to the linux server using smbfs I cannot change the permissions of any of the files/directories to anything other than 555 or 777 - I get this ...

chmod: changing permissions of `hello' (requested: 0444, actual: 0555): Operation not permitted

Due to CVS doing various chmod's under the hood I cannot go with this option.

As an experiment I hooked up another linux box and connected using CIFS and I have no problem. Of course I'd use CIFS on the first box if I could but it's RHEL3 and that doesn't support it.

So if CIFS can do it but smbfs can't then it can't be something on the Windows server side can it? The lines in /etc/fstab's are as follows:

//saturn/CVS /mnt/CVS smbfs defaults,rw,noauto,user,dmask=777,fmask=777,umask=000 0 0
//saturn/CVS /mnt/CVS cifs defaults,auto,noexec,username=cvsuser 0 0

What am I doing wrong?

Thanks
Adam
 
It looks like you are specifying a username for cifs and you aren't specifying one for smbfs. That's probably the issue there.
 
No I should have said, but I specify the user using an environment variable in the smbfs option.

I'm reading a lot of tips about "umask". Is that a server or client side argument?
 
On mount I set fmask=777, dmask=777, and umask=000 so as far as I'm aware this should allow me to change the permissions on all contents of the mount point to anything I like.

However it only reports success if I set the value to 777 or 555. If I begin the argument with a 7 or 5 then it complains and sets it to 777 or 555 respectively, but attempting to set it to anything else reports failure and leaves it at its current value.

I have noticed that on a FC4 machine the behaviour is the same (in that it doesn't work) but it doesn't report an error. However on an RHEL3 machine it actually fails. Is this perhaps something that has always been an issue but has only raised its head with the version of chmod on the RHEL3 kernel?

Adam
 
The only other thing which I can suggest is looking into the uid parameter when mounting the share. It sets the ownership of the share when it is mounted.

I do recall having write problems with the top level directory with my mounted shares (I never did get it to work, I created a subdirectory and put everything in it to fix it), but I don't know if there is a way around it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top