0

Hope the following explains it. apps folder belongs to devgrp with rwx group access and jenkins user belongs to devgrp. however I am not able to cd into the folder as jenkins.

P.S: I have logged out and logged back in after adding users to the group.

jenkins@ip-172-xx-xx-xx:/home/bitnami$ ls -l
total 4
lrwxrwxrwx 1 bitnami devgrp   17 Apr 17 10:55 apps -> /opt/bitnami/apps
-r-------- 1 bitnami bitnami 419 May 29 04:47 bitnami_credentials
-rw-rw-r-- 1 bitnami bitnami   0 May 31 04:08 do.deploy
lrwxrwxrwx 1 bitnami bitnami  27 Apr 17 10:55 htdocs -> /opt/bitnami/apache2/htdocs
lrwxrwxrwx 1 bitnami bitnami  12 Apr 17 10:55 stack -> /opt/bitnami
jenkins@ip-172-xx-xx-xx:/home/bitnami$ cd apps
bash: cd: apps: Permission denied
jenkins@ip-172-xx-xx-xx:/home/bitnami$ groups
jenkins sudo devgrp
jenkins@ip-172-xx-xx-xx:/home/bitnami$ uname -a
Linux ip-172-xx-xx-xx 4.4.0-1060-aws #69-Ubuntu SMP Sun May 20 13:42:07 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
jenkins@ip-172-xx-xx-xx:/home/bitnami$ 

migrated from stackoverflow.com May 31 '18 at 16:59

This question came from our site for professional and enthusiast programmers.

  • 1
    The problem is that apps is a symbolic link to another directory. You need to check the permissions to that directory. – Some programmer dude May 31 '18 at 12:40
  • Have you checked the permissions on /opt and /opt/bitnami . Oops, sorry dude – Rolf of Saxony May 31 '18 at 12:41
  • @Someprogrammerdude I just figured that out, thanks though :) New to linux and wasn't aware of symbolic links. – user1102532 May 31 '18 at 12:47
  • @Cyrus oh sorry, is there a way to move it to Unix & Linux Stack Exchange. I'd like to leave this question for people having the same problem. – user1102532 May 31 '18 at 12:49
  • I asked the moderators about this. Maybe it'll be done. – Cyrus May 31 '18 at 12:55
4

Note that your /home/bitnami/apps file is a symbolic link to /opt/bitnami/apps.

When you check permission on that kind of file, you will always have something like "lrwxrwxrwx" that is link, (read, write, execute)*3.


Your permissions are in another castle!

In fact, the real permissions are stored elsewhere, and you can check them using ls -l /opt/bitnami/apps.

Remember that folders need both execution and read permissions in order to allow users to enter in and see which files are there.

You can solve your problem with chmod 770 /opt/bitnami/apps.


Inheritance

Furthermore, if you need that all files and subdirectories of that folder have to be assigned to the group devgrp, you can use chmod 4770 /opt/bitnami/apps.

That will set group inheritance on and every new created file (or folder) will be assigned to the same group as the parent directory (devgrp in this specific case).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy