Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

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".

share|improve this answer
    
"they always are a single path component." - Perfect. Thank you. That did it. –  Stann Aug 15 '11 at 8:10
add comment

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

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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