[linux-cifs-client] chmod fails Permission denied with cifs client mounted samba share

Jeff Layton jlayton at poochiereds.net
Mon Jul 20 10:30:11 MDT 2009


On Sat, 2009-06-27 at 17:21 -0700, munga wrote:

> I have a Thecus N2100 NAS box running samba Version 3.0.23a and I am
> mounting it in /etc/fstab as below
> //n2100/svn_repos /media/svn_repos cifs
> auto,user,sfu,username=mythtv,password=mythtv,,rw 0 0
> The CIFS client is mount.cifs version: 1.12-3.3.4

> The problem is I get Permission denied errors when using chmod as below.
> Even touching a file gives errors although it still creates the file. If I
> mount the samba share via a windows machine I am able to change the security
> settings as expected. I have tried many different options with no change. I
> need chmod to work so I can setup a subversion repository on it.
> [root at mythtv media]
> # ll svn_repos/
> total 4
> -rwxrwxrw-+ 1 mythtv users 0 Jun 28 08:48 test
> [root at mythtv media]
> # chmod 766 svn_repos/test 
> chmod: changing permissions of `svn_repos/test': Permission denied
> [root at mythtv media]
> # touch svn_repos/test2
> touch: setting times of `svn_repos/test2': Invalid argument
> 

Ok, so in a private email you said that the client was running 2.6.28.
That's reasonably recent, so it's unlikely to be a known issue that was
fixed recently or anything...

Often these sorts of issues are due to a mismatch on client and server
of uid's.

The first thing I'd try is turning off the "sfu" option. That shouldn't
be needed for true POSIX extensions to work. I sort of doubt that it'll
matter though.

Some more questions:

I see the "user" option there. Are you mounting this as an unprivileged
user?

Does "mythtv" have the same uid on both the client and server?

If you log into the server, does the "svn_repos/test" show itself as
being owned by "mythtv" as well?

-- 
Jeff Layton <jlayton at poochiereds.net>



More information about the linux-cifs-client mailing list