cant solve the permmisions problem

#1
Hi,

I wanted to install wordpress on OLS and received a error that wp-config.php cant be created, witch means is a permissions problem somewhere, here are my settings.

Server Configuration > External App running as nobody:nobody
Server Configuration > Script Handler > Handler Type > LiteSpeed SAPI
Server Configuration > Script Handler > Handler Name> lsphp5

Virtual Host Name domain.com
Virtual Host Root $SERVER_ROOT/$VH_NAME/
Config File $SERVER_ROOT/conf/vhosts/$VH_NAME/vhconf.conf
Note: Instantiated from template PHP_SuEXEC

Virtual Host domain.com > Basic > ExtApp Set UID Mode Server UID
Virtual Host domain.com > General > Document Root /home/user/html
Virtual Host domain.com > External App running as user:user
Virtual Host domain.com > Script Handler > Handler Type LiteSpeed SAPI
Virtual Host domain.com > Script Handler > Handler Name [Server Level]: lsphp5


/home/user/html and all files in the folder are owned by user:user

What i'm doing wrong ?

thanks.
 

lskagan

Administrator
#3
Hi @andreig

Looking at your configuration you have ExtApp set to use Server UID, this would require the files to be owned at minimum user:nobody. If you switch it to use DocRoot UID it will then be able to be run as user:user.

Cheers,
Jon
 
#4
I have same problem in my lab
Document Root = $VH_ROOT/
Virtual Host Root = /usr/local/lsws/public_html/site1
ExtApp Set UID Mode = DocRoot UID


$ getfacl /usr/local/lsws/public_html/site1
# file: usr/local/lsws/public_html/site1
# owner: user
# group: nobody
# flags: -s-
user::rwx
group::r-x
other::r-x

all dir`s 755 (user:nobody)
all files 644 (user:nobody)

php:
$uid = posix_getuid();
echo var_export(posix_getpwuid($uid),true);

return:
array (
'name' => 'nobody',
'passwd' => 'x',
'uid' => 99,
'gid' => 99,
'gecos' => 'Nobody',
'dir' => '/',
'shell' => '/sbin/nologin',
)

Thanks to the helpers and the community!
 

David

Active Member
#9
I did some tests locally with a newly installed OLS and instantiated a new vhost from template PHP_SuEXEC, set the public_html DIR another as own as test:test.
It runs as DOC GUID.

1207 postfix 20 0 92108 4112 3020 S 0.0 0.0 0:00.00 pickup
1208 root 20 0 136720 5080 3848 S 0.0 0.1 0:00.14 sshd
1210 root 20 0 115520 2196 1696 S 0.0 0.0 0:00.08 bash
1498 root 20 0 41576 3740 2472 S 0.0 0.0 0:00.14 litespeed
1505 root 20 0 41044 1160 344 S 0.0 0.0 0:00.02 litespeed
1544 nobody 20 0 42772 2420 1092 S 0.0 0.0 0:00.34 litespeed
1545 nobody 20 0 43320 3540 1720 S 0.0 0.0 0:00.36 litespeed
1581 lsadm 20 0 29748 4216 2556 S 0.0 0.1 0:00.00 admin_php
1584 root 20 0 157576 2092 1500 R 0.0 0.0 0:00.00 top
1585 test 20 0 30012 3520 2024 S 0.0 0.0 0:00.00 lsphp

I tested with current code, and this part is the same as 1.4.27.
 
#10
Hi,

I am getting some errors like this. What will be the issue and how to fix it?

2021-01-31 05:10:39.525249 [NOTICE] [30175] Pass listener *:7080, copy fd 21 to 1001.
2021-01-31 05:10:39.525264 [NOTICE] [30175] Pass listener *:8088, copy fd 23 to 1000.
2021-01-31 05:10:39.553738 [ERROR] [config:server:basics] Invalid User Name(nobody) or Group Name(nobody)!
2021-01-31 05:10:39.554895 [NOTICE] [13108] [AutoRestarter] child process with pid=13151 exited with status=0!
2021-01-31 05:10:39.555036 [NOTICE] [13108] Server Stopped!
2021-01-31 05:10:56.673436 [ERROR] [config:server:basics] Invalid User Name(nobody) or Group Name(nobody)!
 
Top