1

I'm trying to setup 2 samba shares (actual Linux permissions on them are 777):

  1. Volume_1 (cifs username is firstUser)
  2. Volume_1/someSubDir (cifs username is secondUser)

I get this error when second user tries to access Volume_1/someSubDir:

mount error(13): Permission denied

Is this how samba supposed to work?

Does secondUser username has to be added to Volume_1 access list also?

Is there a way to give all users access to Volume_1 and restrict access to Volume_1/someSubDir?

works:

sudo mount -t cifs -o username=firstUser,password=firstUserPassword,_netdev,noatime //192.168.10.199/Volume_1 /media/Volume_1

Doesn't:

sudo mount -t cifs -o username=secondUser,password=secondUserPassword,_netdev,noatime //192.168.10.199/Volume_1/someSubDir /media/someSubDir
1

Samba share names are not related to the shared directory's path, and they always are a single path component.

When you mount //server/Volume_1/someSubDir, the share name is Volume_1, and /someSubDir is merely a subdirectory in that share.

If you want to use different permissions for someSubDir, you will have to pick a different share name, for example, "Volume_1 subdir".

  • "they always are a single path component." - Perfect. Thank you. That did it. – Stann Aug 15 '11 at 8:10
1

Did you use smbpasswd to set the Samba password for those users?

  • well.; I did it through the web interface, but I think it uses smbpasswd anyway. smbpasswd file contains hashes for both users. – Stann Aug 15 '11 at 7:53

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.