[CentOS] Using umask

Marian Marinov mm at yuhu.biz
Tue Jun 21 15:33:36 UTC 2011


On Tuesday 21 June 2011 18:27:11 John Hodrien wrote:
> On Tue, 21 Jun 2011, Todd Cary wrote:
> > Grasping a full understanding of setting default Users, Groups
> > and Masks has alluded me over the years, but now I find myself in
> > a situation where manually "setting" the file/directory
> > attributes is becoming a pain.
> > 
> > I understand the fundamentals of the file attributes, though from
> > time to time I have to review the "sticky bit"; what I do not
> > understand is where/how the attributes are set when a user
> > creates or modifies a file/directory.  Here is my situation:
> > 
> > My /var/www/html files have been manually set by me to
> > apache/apache 774.  This allows my PHP applications to access the
> > files, and I assume this is a "good" setting.
> > 
> > Now, my server is connected via Samba to my desktop.  If I create
> > a file, it is todd/todd 744, so Apache cannot access them.
> > 
> > If PHP (Apache) creates or modifies a file, it is apache/apache
> > 755, so I cannot access them (Write/Delete).
> > 
> > Is there a way to resolve this?  When I FTP to a friend's
> > rent-a-server, I can read/write/delete all of the files I have
> > placed there *and* the same for files touched by PHP (Apache).
> > 
> > My Linux Admin books as well as my Linux books do not appear to
> > cover this and/or my experience is lacking.
> 
> Either have a group that you're both a member of and have a SGID bit set on
> the relevent directories using that gruop, or look at ACLs.
> 
> jh

Or you can simply start using mod_suphp or suexec for running your php 
application. 

-- 
Best regards,
Marian Marinov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.centos.org/pipermail/centos/attachments/20110621/b91c4afe/attachment.sig>


More information about the CentOS mailing list