You are not logged in.

#1 2022-01-31 17:56:45

Morta
Member
Registered: 2019-07-07
Posts: 660

Permission error fcgi apache

[Mon Jan 31 17:49:50.757652 2022] [proxy:error] [pid 869523] (13)Permission denied: AH02454: FCGI: attempt to connect to Unix domain socket /run/nextcloud/nextcloud.sock (*) failed
[Mon Jan 31 17:49:50.757731 2022] [proxy_fcgi:error] [pid 869523] [client 192.168.1.106:34806] AH01079: failed to make connection to backend: httpd-UDS
 cat nextcloud.conf 


[nextcloud]
user = nextcloud
group = nextcloud
listen = /run/nextcloud/nextcloud.sock
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp

; should be accessible by your web server
listen.owner = http
listen.group = http
listen.mode = 0660
pm = dynamic
pm.max_children = 15
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
cat /etc/httpd/conf/vhosts/nextcloud.conf 

<VirtualHost *:80>
	DocumentRoot /usr/share/webapps/nextcloud
	ServerName 192.168.1.118
	ServerAdmin mail@joelmueller.ch
	DirectoryIndex index.php index.html
	ErrorLog /var/log/httpd/error.log
	CustomLog /var/log/httpd/access.log combined
	<Directory /usr/share/webapps/nextcloud>
	  Require all granted
	  AllowOverride All
	  Options FollowSymLinks MultiViews
	</Directory>
	
	<IfModule mod_dav.c>
        Dav off
	</IfModule>
	<IfModule mpm_itk_module>
	AssignUserId nextcloud nextcloud
	</IfModule>
	<FilesMatch \.php$>
	 SetHandler "proxy:unix:/run/nextcloud/nextcloud.sock|fcgi://localhost/"
	</FilesMatch>
	
	SetEnv HOME /usr/share/webapps/nextcloud
	SetEnv HTTP_HOME /usr/share/webapps/nextcloud
</VirtualHost>
ls -la /var/run/nextcloud/nextcloud.sock 
srw-rw---- 1 http http 0 Jan 31 17:49 /var/run/nextcloud/nextcloud.sock

What im doing wrong?

I got this error on my page

Access not possible!


Error 503

192.168.1.118
Apache/2.4.52 (Unix) mpm-itk/2.4.7-04 PHP/8.1.2

I did chown http:http /var/run/nextcloud/nextcloud.sock
I did chmod 0660 /var/run/nextcloud/nextcloud.sock

But I can't access the socket with apache.... Why?

Offline

#2 2022-01-31 20:30:55

Morta
Member
Registered: 2019-07-07
Posts: 660

Re: Permission error fcgi apache

I could fixed with chmod 0777 /var/run/nextcloud/nextcloud.sock and change listen.mode to 0777 but now I have the problem that .ocdata is not accessible.

So why need Apache 0777 mode. I toughed that Apache running as a Superuser and not as normal Systemuser. How I can change that?

Offline

#3 2022-01-31 20:35:00

Morta
Member
Registered: 2019-07-07
Posts: 660

Re: Permission error fcgi apache

[root@nas nextcloud]# ls -la
total 24
drwxrwx---  5 http  http  4096 Jan 28 22:24 .
drwsrwsrwt  7 morta wheel 4096 Jan 31 20:20 ..
drwxrws---  5 http  http  4096 Jan 28 22:47 admin
drwxrwx--- 10 http  http  4096 Jan 28 22:07 appdata_ockrg9az0dnk
-rwxrwx---  1 http  http   542 Jan 28 21:04 .htaccess
-rwxrwx---  1 http  http     0 Jan 28 21:04 index.html
drwxrwx---  2 http  http  4096 Jan 28 22:24 Morta
-rwxrwx---  1 http  http     0 Jan 28 21:04 .ocdata

.ocdata exist but can't write to them even when I set 0777. The Nextcloud gives me following errror.  Your data directory is not writable

Last edited by Morta (2022-01-31 20:35:39)

Offline

Board footer

Powered by FluxBB