I have the home folder of my Raspberry Pi B+ shared via SMB working fine. Now i'm trying to make a public, write only folder: i edited the configuration like so but it doesn't seem to work. I can't write anything to that folder.


path = /home/pi/Kingston/Public
create mask = 0644
directory mask = 0755
browsable = no
writeable = yes
guest ok = yes

Try changing your directory mask to 0766 => 6 = read and write

5 = read and execute

Edit: the directory mask is equivalent to the unix file system permissions in numeric notation. Therefore 0 means no permissions, 1 means execute and so on.

Further reading here https://en.wikipedia.org/wiki/File_system_permissions#Numeric_notation

Edit 2: Like goldilocks corrected me a directory needs also execution permission. Therefore the mask has to be 0777. Like Chris Down explained in his answer on Unix & Linux:

The execute bit allows the affected user to enter the directory, and access files and directories inside

| improve this answer | |
  • you might explain how and why 6 = read and write etc. – Steve Robillard Jan 6 '16 at 13:59
  • I know about permissions but it doesn't seem to work either – Matteo Jan 6 '16 at 14:04
  • Because directories require executable access. That should be 0777, not 0766. If you want to make something equally accessible by everyone, then the last three numbers of the mask should be the same. To explain: 4 is read, 2 is write, 1 is execute (see that wikipedia article). – goldilocks Jan 6 '16 at 14:16
  • I still can't get it to work, i have set both create make and directory mask to 0777 and also set the permissions of Public to 777. – Matteo Jan 6 '16 at 14:31
  • 1
    @Matteo If you solve your problem, it oculd be nice to share it answering instead of commenting. – mpromonet Jan 6 '16 at 19:12

Just in case anyone asks, here is a Linux file permissions and attributes that explains in detail what the attributes mean.

| improve this answer | |

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.