LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 05-29-2009, 10:48 AM   #1
jtworley82
LQ Newbie
 
Registered: May 2009
Posts: 17

Rep: Reputation: 0
samba permissions problem


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

anything else I should be checking?
 
Old 05-29-2009, 12:16 PM   #2
jtworley82
LQ Newbie
 
Registered: May 2009
Posts: 17

Original Poster
Rep: Reputation: 0
more info

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?
 
Old 05-29-2009, 12:30 PM   #3
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
After changing the config, did you reload the config?
 
Old 05-29-2009, 12:36 PM   #4
jtworley82
LQ Newbie
 
Registered: May 2009
Posts: 17

Original Poster
Rep: Reputation: 0
yes

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.
 
Old 05-29-2009, 12:45 PM   #5
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
Quick thought, isn't /var/www/ owned by your web server user? So presumably, thats where it gets changed?

When do the permissions revert back? Login? Right away? Set amount of time?
 
Old 06-04-2009, 11:13 AM   #6
jtworley82
LQ Newbie
 
Registered: May 2009
Posts: 17

Original Poster
Rep: Reputation: 0
This is what I did

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.
 
Old 06-04-2009, 11:16 AM   #7
battletroll
Member
 
Registered: Dec 2004
Location: Alabama
Distribution: Slackware, Solaris,Fedora, CentOS, Redhat, SGI
Posts: 65

Rep: Reputation: 18
Are you running SE_Linux?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba Permissions Problem gw1500se Mandriva 3 12-10-2008 03:19 PM
Samba Permissions Problem jorbot Linux - Networking 3 06-09-2008 05:53 AM
permissions problem with samba tommytomthms5 Linux - Newbie 4 09-10-2007 10:49 PM
Samba permissions problem Hans Vanpee Linux - Networking 2 01-27-2006 10:43 AM
Samba Permissions Problem Stormblade Linux - Software 1 11-12-2004 08:09 AM


All times are GMT -5. The time now is 12:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration