HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Make all website directories writable (by default) (http://www.howtoforge.com/forums/showthread.php?t=34021)

mgibson 22nd April 2009 17:29

Make all website directories writable (by default)
 
Hi,

Is there a way to make all site directories writable by default instead of chmod 777 everytime?

My scenario is - joomla.

- A new domain, ftp user & mysql db will be created through ISPConfig3
- Joomla is uploaded via ftp to the /web folder.
- The Joomla setup is ran, and cannot write a configuration file in the root directory (/web).

Can this be done?

Thanks,

Mark.

till 22nd April 2009 17:32

The directory permissions are all fine, there is no need to set them to 777. You just used the wrong php type. For joomla you will have to use either suphp or php-fcgi + suexec so that the php scripts run under the correct admin user of the website user instead of the apache user.

mgibson 22nd April 2009 18:01

I thought it might be something silly but couldn't figure this out.

thanks

mark.

tebokkel 23rd April 2009 00:20

Simple cron-job could do the trick, but messing around with world-writable rights by a knitwit admin was once the cause I managed to get myself root-rights to get my email going again. :cool:
Even world-readable is basically dangerous on a shared server. Database passwords in config files from other users are very interesting and very difficult to prevent (without suPHP, suEXEC, basedirs, safepaths, no CGI, no shell, etc, etc, etc, etc).

Paul

robertlouwen 3rd June 2009 01:35

Quote:

Originally Posted by till (Post 183683)
The directory permissions are all fine, there is no need to set them to 777. You just used the wrong php type. For joomla you will have to use either suphp or php-fcgi + suexec so that the php scripts run under the correct admin user of the website user instead of the apache user.

@ Till,

Actually really stupid but I want to be sure I understand.

For each website select fast - CGI and put a tick in SuEXEC box.

And for your information: Finally I got my FTP- SMTP and WEB server up and running.
I did not give up and succeeded ( there are a few minnor issues )

Thanks for ISPConfig !

SamTzu 3rd June 2009 22:22

File/Folder permissions
 
I have noticed some issues with file/folder permissions on Joomla.
After migrating sites to ISPConfig3 some sites suffer from permissions issues.
New pictures on Virtuemart get incorrect file permissions etc.

umask 0022 is correct so what could cause this?
I'm using CGI, SSI, suEXEC and suPHP on Joomla sites.

Any suggestions?


Sam

robertlouwen 3rd June 2009 23:50

@ Samtzu

Just like you I am struggling with this.
Tried all kinds of php ( fast-cgi, suphp, mod-php ) and so far did not find a combination that works.
On the other hand I also tried chown on the entire directory and I have reasons to believe it works.
My joomla web is here : /var/www/clients/client1/web1/web/joomla ( client1 is me ) so i did this : cd /var/www/clients/client1/web1/web (enter)
chown -R -v -f web1:client1 joomla (enter)

maybe this works for you.
Good luck

SamTzu 3rd June 2009 23:55

I have been forced to run these commands on web folder...
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
chmod 777 tmp/ -Rf

till 4th June 2009 09:16

This should both not be nescessary if you uploaded the files with FTP and then used either suexec + php-fastcgi or suphp. as the files will have the correct owners when uploaded with ftp and chowning is not nescessary as the files will get written by the cms systems under the same user. I run a lot of sites like that and never neded to chown or chmod something when using ispconfig 3.

robertlouwen 4th June 2009 12:26

@ Till,

Thank you for this !

To me it seemed easier to upload joomla.tar.gz to the website then go to my linux machine do tar xvzf and after that chown.

I go try to unzip joomla.tar.gz first and than upload all files ( takes a little longer but who cares )


All times are GMT +2. The time now is 11:12.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.