When I install a new blog, the install script creates /archives, /uploads, serendipity_config_local.inc.php and .htaccess with an ownership of "apache".
This means I cannot change permissions (chmod 777) and in some cases plugins fail. Plugins probably fail because of the permissions.
My virtual server is unix based and I use PLESK to access the files etc. I have no shell access available to me.
I can get my ISP to make changes to fix the problem but it's a real pain when upgrading and experimenting. Is the installation correct or do I have an apache or php configurartion problem?
Thanks.
PS I noticed sitemap.gz is also created with an ownership of "apache" so I can't delete it!
apache ownership of files on server
-
gwilsonmail
- Regular
- Posts: 146
- Joined: Tue Jul 12, 2005 9:12 pm
- Location: Ottawa, Canada
- Contact:
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: apache ownership of files on server
It seems that the umask of the apache user does not allow others to read/write your files as your FTP user is not in the same group as your apache user.
You can, however, write a simple PHP script:
And then you can do everything you like. 
Regards,
Garvin
You can, however, write a simple PHP script:
Code: Select all
<?php
chmod('uploads', 0777);
?>
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
gwilsonmail
- Regular
- Posts: 146
- Joined: Tue Jul 12, 2005 9:12 pm
- Location: Ottawa, Canada
- Contact:
Thanks garvin.
That was particularly fast!
So perhaps it's a config issue with the isp. My virtual host account allows me to add/remove my own domains etc. So I would have thought This type of problem would not happen.
i have raised a trouble ticket with the ISP.
Thanks for the php snippet. I should be brave an write a script that does all the chmod stuff for a new install for me.
That was particularly fast!
So perhaps it's a config issue with the isp. My virtual host account allows me to add/remove my own domains etc. So I would have thought This type of problem would not happen.
i have raised a trouble ticket with the ISP.
Thanks for the php snippet. I should be brave an write a script that does all the chmod stuff for a new install for me.
gw
-
gwilsonmail
- Regular
- Posts: 146
- Joined: Tue Jul 12, 2005 9:12 pm
- Location: Ottawa, Canada
- Contact:
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Oh. Then you definitely need to check back with your provider and tell him about the problematic setup of his. 
Regards,
Garvin
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
gwilsonmail
- Regular
- Posts: 146
- Joined: Tue Jul 12, 2005 9:12 pm
- Location: Ottawa, Canada
- Contact:
They replied
i have to admit at $2.95/mth for one domain and $4.95 for ~10 domains it's a good deal.
Once I'm setup it should be OK.
This may be an issue with virtual hosting, which is so common these days and at the price-point for blogging."There is no other solution for this, than to let us know, and we will fix the ownership of files."
i have to admit at $2.95/mth for one domain and $4.95 for ~10 domains it's a good deal.
Once I'm setup it should be OK.
gw
It's not a good deal if they don't have it properly configuredgwilsonmail wrote:They replied
This may be an issue with virtual hosting, which is so common these days and at the price-point for blogging."There is no other solution for this, than to let us know, and we will fix the ownership of files."
i have to admit at $2.95/mth for one domain and $4.95 for ~10 domains it's a good deal.
Once I'm setup it should be OK.
I ran into loads of problems with a shared host provider a few years back...you gotta watch those super cheap ones!
In another thread I mentioned suphp, which is an apache module that lets php applications run with user privleges...No one replied if it's been tried for s9y, but I would imagine it works. From an administrative point of view, this would be a much more reasonable solution than to have users email each time they need permissions reset. You may want to mention this to your provider to see if they would install it...
Brett
-
gwilsonmail
- Regular
- Posts: 146
- Joined: Tue Jul 12, 2005 9:12 pm
- Location: Ottawa, Canada
- Contact:
Do they have it misconfigured or are they being ultraprotective of their server?
I ran into the same issue (wrong ownership) last week and I had no idea that it was related to the install. They said it "happens sometimes" and that they'd fix it if it ever happened again.
Thinking about it - how did i ever get s9y to work in the first place? Then it struck me that i had installed and had it working locally on my pc. Then i ftp'd the files to the server and changed the params in the config file.
That seems to be a reasonable work around - install somewhere else, then transfer all the files. That way you get the ownership and permissions you want without involving the ISP.
I ran into the same issue (wrong ownership) last week and I had no idea that it was related to the install. They said it "happens sometimes" and that they'd fix it if it ever happened again.
Thinking about it - how did i ever get s9y to work in the first place? Then it struck me that i had installed and had it working locally on my pc. Then i ftp'd the files to the server and changed the params in the config file.
That seems to be a reasonable work around - install somewhere else, then transfer all the files. That way you get the ownership and permissions you want without involving the ISP.
gw
I shouldn't have said that they don't have it configured properly...that's a bit of my bad experiences speaking...
What you are experiencing is very common, but there are steps the provider could take to help avoid it. Basically the problem is that apache, the httpd server, is running as user that isn't you. It will generally write files as:
-rw------- 1 apache apache 590 Jul 1 19:45 serendipity_config_local.inc.php*
This means that only the user apache has any read or write access to this file. The solution Garvin gave you would usually have worked, but they apparently have tighter security. As suphp fixes this problem, I'm at a loss to explain why they haven't used it...though I admit I've never had a reason to use it on my server, so it could be horrible for all I know...
The problem with the work around you describe is that s9y generally won't have write access to the files unless you are able to chown or chmod them. The permissions errors you spoke of earlier may be the result of this...
I understand the desire for a cheap host...I've been there myself...but sometimes it's worth it to spend a few extra dollars for shell access and maybe even a VPS/VM/VDS.
I personally use unixshell.com, and they've been great. I think the cheapest they have is like $7 or $8, but full root access...
Brett
What you are experiencing is very common, but there are steps the provider could take to help avoid it. Basically the problem is that apache, the httpd server, is running as user that isn't you. It will generally write files as:
-rw------- 1 apache apache 590 Jul 1 19:45 serendipity_config_local.inc.php*
This means that only the user apache has any read or write access to this file. The solution Garvin gave you would usually have worked, but they apparently have tighter security. As suphp fixes this problem, I'm at a loss to explain why they haven't used it...though I admit I've never had a reason to use it on my server, so it could be horrible for all I know...
The problem with the work around you describe is that s9y generally won't have write access to the files unless you are able to chown or chmod them. The permissions errors you spoke of earlier may be the result of this...
I understand the desire for a cheap host...I've been there myself...but sometimes it's worth it to spend a few extra dollars for shell access and maybe even a VPS/VM/VDS.
I personally use unixshell.com, and they've been great. I think the cheapest they have is like $7 or $8, but full root access...
Brett
-
gwilsonmail
- Regular
- Posts: 146
- Joined: Tue Jul 12, 2005 9:12 pm
- Location: Ottawa, Canada
- Contact:
Thanks Brett.
It's all becoming a lot clearer!
I can't chown.
But i can chmod via PLESK or an FTP client. So as long as i get the ownership correct I should be able to sort things out.
I just discovered that they didn't change the ownership of .htaccess!
Tomorrow is another day.
thanks for your assistance. much appreciated
It's all becoming a lot clearer!
I can't chown.
But i can chmod via PLESK or an FTP client. So as long as i get the ownership correct I should be able to sort things out.
I just discovered that they didn't change the ownership of .htaccess!
Tomorrow is another day.
thanks for your assistance. much appreciated
gw