• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 665
  • Last Modified:

Setting umask for one directory

Hi!

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?
0
PappP
Asked:
PappP
  • 2
  • 2
1 Solution
 
sunnycoderCommented:
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


Cheers!
Sunnycoder
0
 
sunnycoderCommented:
setfacl -m
default:user::rwx,default:group::rwx,default:other:rwx,default:mask:rwx
<directory>

exact command copied from
http://www.sunmanagers.org/pipermail/summaries/2001-December/000547.html
0
 
m1tk4Commented:
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.
0
 
m1tk4Commented:
oh, and "force create mode" (Samba)
0
 
PappPAuthor Commented:
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)

PappP
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now