[support] mkdir permissions issue

Jason Flatt drupal at oadaeh.net
Thu Jan 10 15:22:03 UTC 2008


On Thursday, January 10 2008 6:27:50 am Tom Holmes Jr. wrote:
> I think we have a little misunderstanding, and that is my fault.
>
> There are three areas where I dealt with permissions:
> 1) The old web-site to be imported ... this directory and files need at
> least to be readable.
> This directory I changed to 0777 and it didn't solve my problem.
>
> 2) The files/imported directory ... of course we need permission to
> create directories and files here.
> I could do this (create directories and files) as root or as another user.
> That's why I was confused.  I could create directories as either a user,
> or as root ... but PHP couldn't.
> This directory I changed to 0777 and it didn't solve my problem.
>
> 3) In the sites/all/modules/importhtml  .... I unzipped the modules into
> the right place.
> I even changed the user/group so it would be the same as the rest of the
> site.
> I didn't even bother to check the permissions of the individual files
> ... I left them as they were unzipped.
> Even as root .... if a file is set to be not executable ... not even
> root can run it.
> So, I when to all the files in this module and  made them executable ...
> that finally solved the problem.
>
> For future sake ... on a linux system ... when I unzip a module and
> change the user/grp ...
> is 0660 the usual permissions to set?

That somewhat depends on how the parent directory is setup, but for a default 
install, the answer is no. The directories are set to 0755 and the files are 
set to 0644. That is everyone can read the directory and read the files in 
the directory. Only the owning user (set with chown) can write to the 
directory or the files. Everyone can enter the directory (the 'x' permission 
for directories), but no one is allowed to execute the files.

The other change I notice you are doing is giving the other "role" (the final 
bit of the four) full access, by changing the files from ###0 to ###7. If you 
change the files to 0644, are you still able to access them, or do you get 
that error again? Based on your original post, I'd bet you're setting the 
owner and group of the files to an owner and group that your web server is 
not a part of, therefore necessitating changing that final bit (###7) to a 4, 
5, 6 or 7.

See "man chmod", especially the description, for more information.


-- 
Jason Flatt
http://www.oadaeh.net/
Father of Six:  http://www.flattfamily.com/ (Joseph, 14; Cramer, 12; Travis, 
10; Angela; Harry, 7; and William, 12:04 am, 12-29-2005)
Linux User:     http://www.xubuntu.org/
Drupal Fanatic: http://drupal.org/


More information about the support mailing list