su: warning: cannot change directory to /mountedvolume/homefolder: Permission denied

Support for security such as Firewalls and securing linux
Post Reply
ivan.ayala
Posts: 2
Joined: 2020/08/10 21:34:04

su: warning: cannot change directory to /mountedvolume/homefolder: Permission denied

Post by ivan.ayala » 2020/08/10 21:46:59

Hello

We have an issue with CentOS 8.

Currently we are installing an application in a mounted volume in order to keep it out of root volume. Originally the app is getting installed here /opt/homefolder and then we have been doing this:

mkdir -p /mnt/vgdata01/data01/opt/homefolder
ln -sf /mnt/vgdata01/data01/opt/homefolder /opt/homefolder

with CentOS 7 this works great, but today we started to test CentOS 8 and when we move the homefolder to that mounted volume :

/dev/mapper/vgdata01-data01 --> /mnt/vgdata01/data01

then we got this error:

example:
```

[root@server]: /opt $ su - user
su: warning: cannot change directory to /opt/homefolder: Permission denied
-bash: /opt/homefolder/.bash_profile: Permission denied

```

any idea???

BShT
Posts: 278
Joined: 2019/10/09 12:31:40

Re: su: warning: cannot change directory to /mountedvolume/homefolder: Permission denied

Post by BShT » 2020/08/11 11:37:41

-bash: /opt/homefolder/.bash_profile: Permission denied...

try to chown -R user:user /opt/homefolder

ivan.ayala
Posts: 2
Joined: 2020/08/10 21:34:04

Re: su: warning: cannot change directory to /mountedvolume/homefolder: Permission denied

Post by ivan.ayala » 2020/08/11 13:52:00

thanks, i got the issue.

i got focussed on the main home folder, but never checked the permissions of the opt folder.

issue was resolved to provide rights in the opt folder in the mounted drive.

thanks

Post Reply

Return to “CentOS 8 - Security Support”