Setting umask for one directory

Posted on 2006-04-19
Last Modified: 2008-02-01

I have set up Samba server to provide two shares for each Win clients:
1. The home directory of whoever is logged in
2. A common public directory that is visible for everybody

Everything works fine except that I want files in the public folder to be readable, writeable, and executeable for everybody regardless of who created the file. Now, because I have the umask set to 0022, files in the public folder is readable for everybody, but writeable only to its creator. Howvere, I wish not to change systemwide umask.

Is there a way to set an umask different from the system umask specially for our public folder only?
Question by:PappP
    LVL 45

    Expert Comment

    Hi PappP,

    > Is there a way to set an umask different from the system umask specially
    > for our public folder only?
    you can use setfacl

    LVL 45

    Expert Comment

    setfacl -m

    exact command copied from
    LVL 15

    Accepted Solution

    In Samba, you can control this using "force group" and "create mask"/"directory mask" options.

    Another way would be to do a chmod g+sw on public directory.
    LVL 15

    Expert Comment

    oh, and "force create mode" (Samba)

    Author Comment

    Tanks for the responses!

    I am really busy right now, but will try the suggestions today or tomorrow, and will award the points.

    btw, setfacl is "command not found" on my system (Mandrake 10.1)


    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    ​Being a Managed Services Provider (MSP) has presented you  with challenges in the past— and by meeting those challenges you’ve reaped the rewards of success.  In 2014, challenges and rewards remain; but as the Internet and business environment evol…
    Hello EE, Today we will learn how to send all your network traffic through Tor which is useful to get around censorship and being tracked all together to a certain degree. This article assumes you will be using Linux, have a minimal knowledge of …
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    This video discusses moving either the default database or any database to a new volume.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now