Starquest321
asked on
Apache Read Write Error
I am having issues with folder permissions:
On applications I keep getting the following errors:
Cannot create folder: /var/www/html/fileserver/t emp__vp497 20pjqi67i0 jsci2lljb5 6/x_messag e1
When installing roundcube - save errors.. the read :: write permissions are not working.
I have given the whole HTML (and recursive subfolders) 777 permissions. Is there some other settings?
On applications I keep getting the following errors:
Cannot create folder: /var/www/html/fileserver/t
When installing roundcube - save errors.. the read :: write permissions are not working.
I have given the whole HTML (and recursive subfolders) 777 permissions. Is there some other settings?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Note that fileserver is a directory within "application"
[root@s360 ~]# ls -al /var/www/html/
total 88
drwxr-xr-x. 4 root root 95 Sep 5 22:55 .
drwxr-xr-x. 4 root root 31 Sep 5 15:35 ..
-rwxr-xr-x. 1 root root 12 Aug 30 19:33 info.php
-rwxr-xr-x. 1 root root 12288 Aug 30 19:35 .info.php.swn
-rwxr-xr-x. 1 root root 12288 Aug 30 19:32 .info.php.swp
drwxrwxr-x. 24 root root 36864 Sep 5 20:22 application
drwxr-xr-x. 11 501 80 4096 Jan 8 2012 webmail
[root@s360 ~]# ls -al /var/www/html/application/ fileserver
total 56
drwxrwxr-x. 2 root root 6 Sep 5 20:21 .
drwxrwxr-x. 24 root root 36864 Sep 5 20:22 ..
[root@s360 ~]#
[root@s360 ~]# ls -al /var/www/html/
total 88
drwxr-xr-x. 4 root root 95 Sep 5 22:55 .
drwxr-xr-x. 4 root root 31 Sep 5 15:35 ..
-rwxr-xr-x. 1 root root 12 Aug 30 19:33 info.php
-rwxr-xr-x. 1 root root 12288 Aug 30 19:35 .info.php.swn
-rwxr-xr-x. 1 root root 12288 Aug 30 19:32 .info.php.swp
drwxrwxr-x. 24 root root 36864 Sep 5 20:22 application
drwxr-xr-x. 11 501 80 4096 Jan 8 2012 webmail
[root@s360 ~]# ls -al /var/www/html/application/
total 56
drwxrwxr-x. 2 root root 6 Sep 5 20:21 .
drwxrwxr-x. 24 root root 36864 Sep 5 20:22 ..
[root@s360 ~]#
ASKER
Could it be possible that the permissions on that /var/www/html should be set www-data:root?
I am reading it in various forms, but I don't have a user like that. . .
When I try the command:
[root@s360 ~]# chown -R www-data:root /var/www/html/
chown: invalid user: ‘www-data:root’
I am reading it in various forms, but I don't have a user like that. . .
When I try the command:
[root@s360 ~]# chown -R www-data:root /var/www/html/
chown: invalid user: ‘www-data:root’
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I changed back to 755 permissions since I thought that giving www a 777 would be completely careless and insecure. I don't know how this should be done - so I am stuck.
When my application tries to create a directory it's running into the error:
Cannot create folder: /var/www/html/application/ temp__474k 3qu2rvfkod oin11rvjjg p3/x_messa ge1
What should be the permissions? How do I know which user is trying to run this? Is this a user different than the mysql user?
When my application tries to create a directory it's running into the error:
Cannot create folder: /var/www/html/application/
What should be the permissions? How do I know which user is trying to run this? Is this a user different than the mysql user?
ASKER
The installation was done using command line while logged in as 'Root'
ASKER
Just read a post that the user trying to access the "html" is actually apache. . . but my ownership is root. So I changed owership :: group to apache. Still no luck.
you changed ownership group? what about user?
directory permissions are 755 so either you change the user also to apache account or change that folder permission to 775 since group rights are r-w thus can't write there
directory permissions are 755 so either you change the user also to apache account or change that folder permission to 775 since group rights are r-w thus can't write there
ASKER
This is the current status now:
Seems like both are apache for user and group. But still no luck:
[root@s ~]# ls -al /var/www/html/
total 88
drwxrwxr-x. 4 apache apache 95 Sep 5 22:55 .
drwxr-xr-x. 4 apache apache 31 Sep 5 15:35 ..
-rwxrwxr-x. 1 apache apache 12 Aug 30 19:33 info.php
-rwxrwxr-x. 1 apache apache 12288 Aug 30 19:35 .info.php.swn
-rwxrwxr-x. 1 apache apache 12288 Aug 30 19:32 .info.php.swp
drwxrwxr-x. 24 apache apache 36864 Sep 5 20:22 application
drwxrwxr-x. 11 apache apache 4096 Jan 8 2012 webmail
Seems like both are apache for user and group. But still no luck:
[root@s ~]# ls -al /var/www/html/
total 88
drwxrwxr-x. 4 apache apache 95 Sep 5 22:55 .
drwxr-xr-x. 4 apache apache 31 Sep 5 15:35 ..
-rwxrwxr-x. 1 apache apache 12 Aug 30 19:33 info.php
-rwxrwxr-x. 1 apache apache 12288 Aug 30 19:35 .info.php.swn
-rwxrwxr-x. 1 apache apache 12288 Aug 30 19:32 .info.php.swp
drwxrwxr-x. 24 apache apache 36864 Sep 5 20:22 application
drwxrwxr-x. 11 apache apache 4096 Jan 8 2012 webmail
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I have made sure that there is a directory called Fireserver.
What is the command to achieve the following:
Can you please give me the specific commands to do the following:
1. Change the "application" directory to the group apache (with all files and subfolders)
2. Give apache write permissions
I have an option to do with this with filizilla. . .but its not saving. Maybe that is where I am going wrong.
Need urgent help
What is the command to achieve the following:
Can you please give me the specific commands to do the following:
1. Change the "application" directory to the group apache (with all files and subfolders)
2. Give apache write permissions
I have an option to do with this with filizilla. . .but its not saving. Maybe that is where I am going wrong.
Need urgent help
ASKER
I have ran the following command on the box now:
ls -al /var/www/html/
drwxr-x---. 4 apache apache 95 Sep 5 22:55 .
drwxr-xr-x. 4 apache apache 31 Sep 5 15:35 ..
-rwxr-x---. 1 apache apache 12 Aug 30 19:33 info.php
-rwxr-x---. 1 apache apache 12288 Aug 30 19:35 .info.php.swn
-rwxr-x---. 1 apache apache 12288 Aug 30 19:32 .info.php.swp
drwxrwx---. 24 apache apache 36864 Sep 5 20:22 application
drwxr-x---. 11 apache apache 4096 Jan 8 2012 webmail
The directory: application also is owned by user :: group apache
I noticed that only the group has write permission - but not the user.
How can I change that?
ls -al /var/www/html/
drwxr-x---. 4 apache apache 95 Sep 5 22:55 .
drwxr-xr-x. 4 apache apache 31 Sep 5 15:35 ..
-rwxr-x---. 1 apache apache 12 Aug 30 19:33 info.php
-rwxr-x---. 1 apache apache 12288 Aug 30 19:35 .info.php.swn
-rwxr-x---. 1 apache apache 12288 Aug 30 19:32 .info.php.swp
drwxrwx---. 24 apache apache 36864 Sep 5 20:22 application
drwxr-x---. 11 apache apache 4096 Jan 8 2012 webmail
The directory: application also is owned by user :: group apache
I noticed that only the group has write permission - but not the user.
How can I change that?
I have made sure that there is a directory called Fireserver.
i do not see a fileserver folder in that directory listing; only 5 files
I noticed that only the group has write permission - but not the user.
not an issue since the user account is rwx; only need to change if a different user in the same group needed write access
ASKER
The fileserver directory is inside the "application" ...
I get also general errors when trying to create directories:
Cannot create folder: /var/www/html/application/ temp__jceq clgkmptva4 qnug8bv34v h7/x_voice mail
The error that I get is from file:
http://192.168.197.130/application/useradd.php
How do I know which user is trying to run the script?
I get also general errors when trying to create directories:
Cannot create folder: /var/www/html/application/
The error that I get is from file:
http://192.168.197.130/application/useradd.php
How do I know which user is trying to run the script?
ASKER
Could it be possible that the apache is NOT the user that is running the website?
RIght now I have set for all files in the directory:
-rwxrwx---. 1 apache apache 62620 Sep 6 03:53 text.php
So user, group apache can read, write, execute ... but I still cannot create folder. COuld it be the application is not logging on properly?
RIght now I have set for all files in the directory:
-rwxrwx---. 1 apache apache 62620 Sep 6 03:53 text.php
So user, group apache can read, write, execute ... but I still cannot create folder. COuld it be the application is not logging on properly?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I don't have a "temp" folder. I think it created on the fly.
Could it be possible that the apache is NOT the user that is running the website?
ps faux | grep httpd
what is the user account listed?
Starquest,
That is why I said that You need to create it, because it should be owned by user, not by Apache, and that is why You are getting an error. Create a folder and it will temptemp for temp folder and it will give it ownership to apache.
Thanks,
D.
That is why I said that You need to create it, because it should be owned by user, not by Apache, and that is why You are getting an error. Create a folder and it will temptemp for temp folder and it will give it ownership to apache.
Thanks,
D.
ASKER
ps faux | grep httpd
root 1080 0.0 1.9 516204 20132 ? Ss Sep07 0:05 /usr/sbin/httpd -DFOREGROUND
apache 4436 0.0 0.7 342356 7600 ? S 05:32 0:00 \_ /usr/sbin/httpd -DFOREGROUND
apache 4438 0.0 1.0 518424 10480 ? S 05:32 0:00 \_ /usr/sbin/httpd -DFOREGROUND
apache 4439 0.0 1.0 518424 10480 ? S 05:32 0:00 \_ /usr/sbin/httpd -DFOREGROUND
apache 4441 0.0 1.0 518424 10480 ? S 05:32 0:00 \_ /usr/sbin/httpd -DFOREGROUND
apache 4442 0.0 3.8 543360 38440 ? S 05:32 0:00 \_ /usr/sbin/httpd -DFOREGROUND
apache 4551 0.0 1.0 518424 10480 ? S 05:49 0:00 \_ /usr/sbin/httpd -DFOREGROUND
apache 4554 0.0 3.7 543032 38108 ? S 05:49 0:00 \_ /usr/sbin/httpd -DFOREGROUND
apache 4555 0.0 1.0 518424 10480 ? S 05:49 0:00 \_ /usr/sbin/httpd -DFOREGROUND
apache 4556 0.0 1.0 518424 10480 ? S 05:49 0:00 \_ /usr/sbin/httpd -DFOREGROUND
apache 4557 0.0 1.0 518424 10480 ? S 05:49 0:00 \_ /usr/sbin/httpd -DFOREGROUND
apache 4563 0.0 0.9 518288 9512 ? S 05:50 0:00 \_ /usr/sbin/httpd -DFOREGROUND
root 4680 0.0 0.0 112640 980 pts/1 S+ 06:37 0:00 | \_ grep --color=auto httpd
root 1080 0.0 1.9 516204 20132 ? Ss Sep07 0:05 /usr/sbin/httpd -DFOREGROUND
apache 4436 0.0 0.7 342356 7600 ? S 05:32 0:00 \_ /usr/sbin/httpd -DFOREGROUND
apache 4438 0.0 1.0 518424 10480 ? S 05:32 0:00 \_ /usr/sbin/httpd -DFOREGROUND
apache 4439 0.0 1.0 518424 10480 ? S 05:32 0:00 \_ /usr/sbin/httpd -DFOREGROUND
apache 4441 0.0 1.0 518424 10480 ? S 05:32 0:00 \_ /usr/sbin/httpd -DFOREGROUND
apache 4442 0.0 3.8 543360 38440 ? S 05:32 0:00 \_ /usr/sbin/httpd -DFOREGROUND
apache 4551 0.0 1.0 518424 10480 ? S 05:49 0:00 \_ /usr/sbin/httpd -DFOREGROUND
apache 4554 0.0 3.7 543032 38108 ? S 05:49 0:00 \_ /usr/sbin/httpd -DFOREGROUND
apache 4555 0.0 1.0 518424 10480 ? S 05:49 0:00 \_ /usr/sbin/httpd -DFOREGROUND
apache 4556 0.0 1.0 518424 10480 ? S 05:49 0:00 \_ /usr/sbin/httpd -DFOREGROUND
apache 4557 0.0 1.0 518424 10480 ? S 05:49 0:00 \_ /usr/sbin/httpd -DFOREGROUND
apache 4563 0.0 0.9 518288 9512 ? S 05:50 0:00 \_ /usr/sbin/httpd -DFOREGROUND
root 4680 0.0 0.0 112640 980 pts/1 S+ 06:37 0:00 | \_ grep --color=auto httpd
ASKER
Dejan: Can you give me specific steps to take?
ASKER
I have created a "new" user .. called "TEMP" to try to solve this issue. Should I put in the group apache to see if this resolves the issue?
The user has "ROOT" rights
The user has "ROOT" rights
Starquest321,
Why did You created new user?
Thanks,
D.
Why did You created new user?
Thanks,
D.
ASKER
Trying anything . . .creating the temp did not do the trick
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Not updated anything. . . and if you tell me which commands to check I will.
This is the last message that was probably the solution of this problem and I will post it so the further question have an answer for this, and in future people who search for the same problem could have an example of answer -
"Can You go to Your /tmp folder and create .htaccess file and in there copy this -
# Set the catch-all handler to prevent scripts from being executed.
SetHandler Drupal_Security_Do_Not_Rem ove_See_SA _2006_006
<Files *>
# Override the handler again if we're run later in the evaluation list.
SetHandler Drupal_Security_Do_Not_Rem ove_See_SA _2013_003
</Files>
# If we know how to do it safely, disable the PHP engine entirely.
<IfModule mod_php5.c>
php_flag engine off
</IfModule>
# PHP 4, Apache 1.
<IfModule mod_php4.c>
php_flag engine off
</IfModule>
# PHP 4, Apache 2.
<IfModule sapi_apache2.c>
php_flag engine off
</IfModule>
or for newer version
# Turn off all options we don't need.
Options None
Options +FollowSymLinks
# Set the catch-all handler to prevent scripts from being executed.
SetHandler Drupal_Security_Do_Not_Rem ove_See_SA _2006_006
<Files *>
# Override the handler again if we're run later in the evaluation list.
SetHandler Drupal_Security_Do_Not_Rem ove_See_SA _2013_003
</Files>
# If we know how to do it safely, disable the PHP engine entirely.
<IfModule mod_php5.c>
php_flag engine off
</IfModule>
Thanks,
D.
"Can You go to Your /tmp folder and create .htaccess file and in there copy this -
# Set the catch-all handler to prevent scripts from being executed.
SetHandler Drupal_Security_Do_Not_Rem
<Files *>
# Override the handler again if we're run later in the evaluation list.
SetHandler Drupal_Security_Do_Not_Rem
</Files>
# If we know how to do it safely, disable the PHP engine entirely.
<IfModule mod_php5.c>
php_flag engine off
</IfModule>
# PHP 4, Apache 1.
<IfModule mod_php4.c>
php_flag engine off
</IfModule>
# PHP 4, Apache 2.
<IfModule sapi_apache2.c>
php_flag engine off
</IfModule>
or for newer version
# Turn off all options we don't need.
Options None
Options +FollowSymLinks
# Set the catch-all handler to prevent scripts from being executed.
SetHandler Drupal_Security_Do_Not_Rem
<Files *>
# Override the handler again if we're run later in the evaluation list.
SetHandler Drupal_Security_Do_Not_Rem
</Files>
# If we know how to do it safely, disable the PHP engine entirely.
<IfModule mod_php5.c>
php_flag engine off
</IfModule>
Thanks,
D.
ASKER