Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am setting up a samba share, and no matter what I do, new files created by samba users always have 770 permissions. ( I want 750) Here is my share setup:
[sharename]
path = /var/www/html
writeable = yes
browseable = yes
guest ok = no
create mask = 750
force create mode = 0750
directory mask = 750
force directory mode = 0750
okay, I figured out that something else is setting the permissions in /var/www/html because I can create a share anywhere else and the mask works fine. I looked in the httpd.conf but didn't see anything. What would be forcing the permissions to 770 on that dir?
Do you mean reload the samba config? I restarted the service. Any other share works fine, it is just /var/www/html that seems to want to be 770 no matter what I do.
The permissions are being set to 770 when the files are created. I could change them, but I am not going to go in there and change them every time a user creates a file. Anyway, /var/www/html insists on creating files with 770 permissions. I am setting up multiple virtual websites, so I just created each site in /var/www/sitename and the 750 create mask works there. I created a user account on the linux box called smbapache and put it in the apache group. I setup my samba shares to force user to smbapache, force group to apache, and valid users = domain\group. That way, my domain users are authenticated with the valid users = line, and when they create files, the files are owned by smbapache (with full permissions). putting smbapache in the apache group gives the apache account read and execute permissions on the website, and gives my users read, write and execute using the smbapache account.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.