-
PHP write permissions
So I have a php script that I am installing on my ubuntu server. The php script that I have has an install via browser after copying the code files in. I go through the setup and on the last page it says it cannot write (create) the .htaccess file or the config.cfg file.
Any ideas what I need to do to get permissions for the files to be made?
-
Re: PHP write permissions
Any files written by the apache web server will have user and group "www-data", the user and group that the server runs under. So any directory into which such files need to be written must be writable by the www-data user.
-
Re: PHP write permissions
Okay that solve the config file issue. But I'm still having issue with the .htaccess. Would that need something different?
-
Re: PHP write permissions
.htaccess files are disabled by default in Ubuntu. If you look at /etc/apache2/sites-available/default, you'll see an "AllowOverride None" entry for both / and /var/www. You can either change these defaults or, better, place the directives that would have gone into .htaccess in the <Directory> stanza of the virtual host that pertains to the software you're installing. If you change the defaults, you'll need to restart apache with "sudo service apache2 restart".
-
Re: PHP write permissions
Sweet I went ahead and just changed the defaults to "AllowOverride All". Thanks a ton!
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks