Announcement

#1 2011-07-18 01:07:49

styxsailor
Translation Team
2011-07-18
34

[resolved] Netinstall on local Apache gives permission error

I am running a local Apache server on a Fedora 15 platform. I have put piwigo-netinstall.php in the Document Root (/var/www/html) and browse to it through localhost/piwigo-netinstall.php.

The script immediately complains that "Write access is needed. It looks like NetInstall wont be able to write in the current directory, and this is required to follow on. Please try to change the permissions to allow write access, then reload this page by hitting the Refresh button.".

I assume the netinstall is trying to write to the Document Root (current directory?), so have tried to relax the permissions. e.g. setting the owner to apache, and, eventually, "chmod -R 777 /var/www".

The problem still persists, what do I need to configure to pass this hurdle?

Thanks for any help,

styxsailor

Offline

 

#2 2011-07-18 19:29:57

styxsailor
Translation Team
2011-07-18
34

Re: [resolved] Netinstall on local Apache gives permission error

Ok, so I went ahead to try the manual install. Downloading all files, unzipping into a "photos" folder in my Document Root. Pointing the browser to "localhost/photos" now throws the error "Give write access (chmod 777) to "_data" directory at the root of your Piwigo installation".

Doing this doesn't help, neither recursively doing "chmod 777" on the Document Root.

So it seems no way to get around this error?

styxsailor

Offline

 

#3 2011-07-22 21:20:24

styxsailor
Translation Team
2011-07-18
34

Re: [resolved] Netinstall on local Apache gives permission error

Ok, so for the records if someone is having this problem, the culprit is SELinux settings. This can be circumvented by switching to "Permissive" mode, but it would most likely be preferred to tell SELinux how to treat these particular requests.

Anyhow, at the command prompt simply

echo 0 >/selinux/enforce

Offline

 

#4 2014-02-06 03:47:47

kilobit
Member
2014-02-06
1

Re: [resolved] Netinstall on local Apache gives permission error

styxsailor wrote:

Ok, so for the records if someone is having this problem, the culprit is SELinux settings. This can be circumvented by switching to "Permissive" mode, but it would most likely be preferred to tell SELinux how to treat these particular requests.

Anyhow, at the command prompt simply

echo 0 >/selinux/enforce

Wow, thanks! exact same problem

Offline

 

#5 2015-07-23 01:10:50

bradawk
Member
2015-07-23
12

Re: [resolved] Netinstall on local Apache gives permission error

Instead of disabling selinux, just fix the context.  First, take a look in /var/log/messages.  You will see some error messages related to it.  You should see a message about running "sealert -l" followed by a long string.  If you run that, it will give you all the commands you need to fix the problem.

Offline

 

#6 2020-08-16 20:14:18

peaca9700
Member
2020-08-16
1

Re: [resolved] Netinstall on local Apache gives permission error

Just to add, in case it helps anyone. If you cannot disable SELinux (as I could not), the following commands will allow access for the site.

semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/your_site/public_html(/.*)?"
restorecon -R -v /var/www/your_site/public_html
systemctl restart httpd

I had the exact same problem and was able to sucessfully install after updating SELinux. Not sure if you need to restart apache, but it is not a bad idea after a config change.

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact