1

I have run into a weird samba/cifs problem with file permissions. Im running ubuntu and have a cifs share configured in my /etc/fstab

//server.addr.com/folder/myFolder /home/Tommy/myCode cifs credentials=/root/.cifs,uid=1000,gid=1000

The share works fine, but the file permissions are being changed from the original. For example when I do an 'ls -lsha' from a locally downloaded copy of the repository I see:

Tommy@dev:~/reposit/thing1$ ls -lsha
total 40K
4.0K drwx------  2 Tommy Tommy 4.0K Jun 21 12:23 .
4.0K drwx------ 19 Tommy Tommy 4.0K Jun 21 12:23 ..
8.0K -rw-------  1 Tommy Tommy 7.6K Jun 21 12:23 Thing1.cpp
12K -rw-------  1 Tommy Tommy 8.8K Jun 21 12:23 Thing1.h
4.0K -rwx------  1 Tommy Tommy 2.0K Jun 21 12:23 Makefile
4.0K -rw-------  1 Tommy Tommy  976 Jun 21 12:23 Support1.cpp
4.0K -rw-------  1 Tommy Tommy 3.1K Jun 21 12:23 Support1.h

However when I do the same thing from the share I see:

Tommy@dev:~/myCode/reposit/thing1$ ls -lsha
total 5.0M
   0 drwxr-xr-x 2 Tommy TomGrp    0 Jun 21 12:35 .
   0 drwxr-xr-x 2 Tommy TomGrp    0 Jun 21 11:47 ..
1.0M -rwxr-xr-x 1 Tommy TomGrp 7.6K Jun 21 12:35 Thing1.cpp
1.0M -rwxr-xr-x 1 Tommy TomGrp 8.8K Jun 21 12:35 Thing1.h
1.0M -rwxr-xr-x 1 Tommy TomGrp 2.0K Jun 19 09:08 Makefile
1.0M -rwxr-xr-x 1 Tommy TomGrp  976 Jun 21 12:35 Support1.cpp
1.0M -rwxr-xr-x 1 Tommy TomGrp 3.1K Jun 21 12:35 Support1.h

Two things stand out: 1 the file sizes are different, and 2 the permissions have been changed. I'm mostly concerned about the permissions aspect (I have diffed the files and they are identical).

I did try changing my smb.conf to have

map archive = no

as recommended here. To no avail.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.