I am using the Import HTML Module and it works to a point. I have HTML Tidy, XML, and XSLT configured within PHP/Drupal. I can pick the source directory, I can see the structure of the web-site I want to import, and I am selecting one file to test. I can get this error message: warning: mkdir() [function.mkdir http://localhost/labmice/admin/import_html/function.mkdir]: Permission denied in /opt/apache/www/labmice/sites/all/modules/import_html/coders_php_library/file-routines.inc on line 164.
I have a files/imported directory already created under Drupal. The permissions for this is chmod 0777 and it is set for public. I am running my Apache web-server on my system as root .... and /tmp is owned by root ... So, I am thinking all the permissions should be fine ... but for some reason I get this error message?
Any ideas on what it is I setup wrong, or what I am doing wrong? If anyone needs anymore information ... please let me know. Thanks!
Tom
Ah ... it turns out, that on Linux, files need to be set 'executable' in order to execute php scripts ...
who knew ...?
Tom Holmes Jr. wrote:
I am using the Import HTML Module and it works to a point. I have HTML Tidy, XML, and XSLT configured within PHP/Drupal. I can pick the source directory, I can see the structure of the web-site I want to import, and I am selecting one file to test. I can get this error message: warning: mkdir() [function.mkdir http://localhost/labmice/admin/import_html/function.mkdir]: Permission denied in /opt/apache/www/labmice/sites/all/modules/import_html/coders_php_library/file-routines.inc on line 164.
I have a files/imported directory already created under Drupal. The permissions for this is chmod 0777 and it is set for public. I am running my Apache web-server on my system as root .... and /tmp is owned by root ... So, I am thinking all the permissions should be fine ... but for some reason I get this error message?
Any ideas on what it is I setup wrong, or what I am doing wrong? If anyone needs anymore information ... please let me know. Thanks!
Tom
If you were actually setting the files to 0777 with chmod, as you indicated in your previous e-mail, then those files were set to be executable. On my systems, none of my PHP files are set to 0777. They're set to 0660.
On Wednesday, January 9 2008 8:36:21 pm Tom Holmes Jr. wrote:
Ah ... it turns out, that on Linux, files need to be set 'executable' in order to execute php scripts ...
who knew ...?
Tom Holmes Jr. wrote:
I am using the Import HTML Module and it works to a point. I have HTML Tidy, XML, and XSLT configured within PHP/Drupal. I can pick the source directory, I can see the structure of the web-site I want to import, and I am selecting one file to test. I can get this error message: warning: mkdir() [function.mkdir http://localhost/labmice/admin/import_html/function.mkdir]: Permission denied in /opt/apache/www/labmice/sites/all/modules/import_html/coders_php_library/ file-routines.inc on line 164.
I have a files/imported directory already created under Drupal. The permissions for this is chmod 0777 and it is set for public. I am running my Apache web-server on my system as root .... and /tmp is owned by root ... So, I am thinking all the permissions should be fine ... but for some reason I get this error message?
Any ideas on what it is I setup wrong, or what I am doing wrong? If anyone needs anymore information ... please let me know. Thanks!
Tom
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?
Thanks! Tom
Jason Flatt wrote:
If you were actually setting the files to 0777 with chmod, as you indicated in your previous e-mail, then those files were set to be executable. On my systems, none of my PHP files are set to 0777. They're set to 0660.
On Wednesday, January 9 2008 8:36:21 pm Tom Holmes Jr. wrote:
Ah ... it turns out, that on Linux, files need to be set 'executable' in order to execute php scripts ...
who knew ...?
Tom Holmes Jr. wrote:
I am using the Import HTML Module and it works to a point. I have HTML Tidy, XML, and XSLT configured within PHP/Drupal. I can pick the source directory, I can see the structure of the web-site I want to import, and I am selecting one file to test. I can get this error message: warning: mkdir() [function.mkdir http://localhost/labmice/admin/import_html/function.mkdir]: Permission denied in /opt/apache/www/labmice/sites/all/modules/import_html/coders_php_library/ file-routines.inc on line 164.
I have a files/imported directory already created under Drupal. The permissions for this is chmod 0777 and it is set for public. I am running my Apache web-server on my system as root .... and /tmp is owned by root ... So, I am thinking all the permissions should be fine ... but for some reason I get this error message?
Any ideas on what it is I setup wrong, or what I am doing wrong? If anyone needs anymore information ... please let me know. Thanks!
Tom
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:
- 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.
- 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.
- 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.
Tom Holmes Jr. ha scritto:
Ah ... it turns out, that on Linux, files need to be set 'executable' in order to execute php scripts ...
The file not, but the directory (files/imported) need to be "executable".
M.
Sviluppo applicazioni web dinamiche (LAMP+Ajax) Telefono: 0200619074 Telefono Cell: +39-3939890025 -- Fax: +39-0291390660
http://www.ziobudda.net ICQ: 58351764 http://www.ziobuddalabs.it Skype: zio_budda http://www.ajaxblog.it MSN: michel@ziobuddalabs.it JABBER: michel@gmail.com