Images Directory chmod 755 777
#1
Posted 14 June 2008, 01:40
The problem is that whenever I do this, I get an error saying "Error: Catalog images directory is not writeable: /usr/local/apache2/htdocs/images/".
I know this has something to do with the user that php is using, but I don't know how to correct it.
I searched the forums, and found some posts relating to this issue, but none of them said exactly how to resolve the issue.
I appreciate the help.
#2
Posted 14 June 2008, 02:02
I was told by a very astute and reliable member here it's because they don't have the server set up properly.
What I did was install a contribution called "osC Filebrowser".
How that works is you upload images via FTP or your Web hosts Cpanel.
Then when you add/change categories in your admin, a window pops up and let's you pick images from the images folder.
That was my "work around".
"Headers already sent" - The definitive help
"Cannot redeclare ..." - How to find/fix it
SSL Implementation Help
Like this post? "Like" it again over there >
#3
Posted 14 June 2008, 02:20
Thanks.
#4
Posted 14 June 2008, 02:23
Quote
Your set up requires permissions of 777 whereas the CGI/phpSuExec set up doesn't allow 777 at all but has a maximum of 755 permissions (read/write/execute by you, read/execute by everyone else). In short to have working 755 folders you would need the host to change the set up.
"Headers already sent" - The definitive help
"Cannot redeclare ..." - How to find/fix it
SSL Implementation Help
Like this post? "Like" it again over there >
#5
Posted 14 June 2008, 03:13
I had to change the user and group ownership so that it matched the user/group that php or the apache server was running as. I used chown to change ownership of the folders that I needed to be able to write to using php.
Thanks.
#6
Posted 19 August 2008, 13:10
# stop scripts from running from the folder IndexIgnore * Options All -Indexes # Secure directory by disabling script execution AddHandler cgi-script .php .php2 .php3 .php4 .php5 .php6 .php7 .php8 .pl .py .jsp .asp .htm .html .shtml .sh .cgi Options -ExecCGI # Don't show this file, that would be bad as well! <Files .htaccess> order allow,deny deny from all </Files>
Step 1 is to create a new htaccess file.
Step 2 upload this file into the images folder and cache (if you use the SEO urls)
This is not my work ( linked from here : http://forum.joomla.org/viewtopic.php?f=267&t=288032 ) but might be more help for those having this as an issue.
cheers,
Peter
-----------------------------
See my Profile (click here) for more information and to contact me for professional osCommerce support that includes SEO development, custom development and security implementation
#7
Posted 26 February 2009, 23:27
bugsy2334, on Jun 14 2008, 01:13 PM, said:
I had to change the user and group ownership so that it matched the user/group that php or the apache server was running as. I used chown to change ownership of the folders that I needed to be able to write to using php.
Thanks.
bugsy,
I am having the same problem with my folder permissions being 777.
Can you elaborate a little more on how you used CHOWN to resolve your situation?
Did you CHOWN nobody:nobody /images or something to that extent?
I know that my PHP is running as user "nobody"
Can anyone see any problems with setting these folders` permissions like this?
Will anyone still be able to upload phishing files and the like to these folders?
Edited by Remulon, 26 February 2009, 23:27.
#8
Posted 27 February 2009, 00:03
The .htaccess file in this post is a "band-aid".
If it works "as advertised" it stops scripts from RUNNING.
So... Hackers could still upload hacking scripts, but if they can't RUN them they don't hurt anything (other than take up space).
You'd just periodically have to clean them out (if you think that is even necessary).
Edited by germ, 27 February 2009, 00:03.
"Headers already sent" - The definitive help
"Cannot redeclare ..." - How to find/fix it
SSL Implementation Help
Like this post? "Like" it again over there >
#9
Posted 27 February 2009, 00:13
For those who are new to this thread, "both methods" are the .htaccess file above, and the method I proposed on page 3 of this thread.
That way, hackers only have very small windows where they can upload scripts into my folders, and they can't run them anyway.
#10
Posted 08 September 2010, 16:14
cannuck1964, on 19 August 2008, 13:10, said:
# stop scripts from running from the folder IndexIgnore * Options All -Indexes # Secure directory by disabling script execution AddHandler cgi-script .php .php2 .php3 .php4 .php5 .php6 .php7 .php8 .pl .py .jsp .asp .htm .html .shtml .sh .cgi Options -ExecCGI # Don't show this file, that would be bad as well! <Files .htaccess> order allow,deny deny from all </Files>
Step 1 is to create a new htaccess file.
Step 2 upload this file into the images folder and cache (if you use the SEO urls)
This is not my work ( linked from here : http://forum.joomla.org/viewtopic.php?f=267&t=288032 ) but might be more help for those having this as an issue.
cheers,
Peter
Hi
So I copy and pasts the code above into a BLANK .htaccess document and upload into the images directory??????
Gareth
#11
Posted 08 September 2010, 16:32
PHP as a CGI and suPHP are a benefit however to the owners of servers that are offering bucket hosting .
KissMT Dynamic SEO Meta & Canonical Header Tags
KissER Error Handling and Debugging
If you found my post useful please click the green + sign to the right
Please only PM me for paid work.
#12
Posted 08 September 2010, 18:02
Perhaps someone can look into an add-on that lets you upload images or whatever via FTP, and then run the rest of the "upload" script (minus the actual uploading) to load the database.
#13
Posted 09 September 2010, 03:25
germ, on 14 June 2008, 02:02, said:
How that works is you upload images via FTP or your Web hosts Cpanel.
Then when you add/change categories in your admin, a window pops up and let's you pick images from the images folder.
Thanks for this suggestion. oscFileBrowser will work for me too.
I've spent the last couple of days trying to install suPHP, only to kill my server, reprovision, and restore backups
Justin
osC is awesome. Thanks everyone.
#14
Posted 18 October 2011, 13:16
pick1e, on 09 September 2010, 03:25, said:
I've spent the last couple of days trying to install suPHP, only to kill my server, reprovision, and restore backups [img]http://forums.oscommerce.com/public/style_emoticons/default/smile.gif[/img] I decided that not being a linux guru I'd just go this route and it works great.
Hi Justin!
I have the same problem, and I have been a couple of days already trying everything and nothing seems to work....
I downloaded the oscFileBrowser, but now I do not know how to install it, Could you please help me with this? Do I need to change something in the OSC configuration?
Thank you
#15
Posted 18 October 2011, 18:17
How can I change to 755?
Thank you
#16
Posted 19 October 2011, 17:11














