0

My company sells software that installs into /opt/company/product and creates a system user to run the services. The postinst routine uses chown on the product folder.

This is a manual test I did (this is CentOS 7):

[root@localhost ~]# cd /opt/company/product/
[root@localhost product]# ls -l
total 0
drw-rw-r--. 2 produser produser  6 Jan 25 01:04 backup
drwxr-xr-x. 2 produser produser 92 Jan 25 03:33 bin
drwxr-xr-x. 2 produser produser 64 Jan 25 03:33 etc
drwxr-xr-x. 2 produser produser 44 Jan 25 01:35 log
[root@localhost product]# su produser
sh-4.2$ cd backup
sh: cd: backup/: Permission denied

produser is the owner, I thought it should have enough permissions to do whatever it wants in those folders? It can neither change into the backup folder nor new folders. What am I missing here?

Apollo
  • 101

0 Answers0