Skip to main content
deleted 24 characters in body
Source Link
nohillside
  • 104.5k
  • 42
  • 222
  • 275

I have a folder hierarchy parent_folder -> inner_folder -> innermost_folder The steps I followed are (as a sudo user):

  • created a symlink pointing to parent_folder
  • set the permissions of the symlink to 0400 => chmod -h 0400
  • set the owner (of symlink) to root => chown -h root

Now I switch to normal user, ran ls -l in the folder which has the symlink, it throws error :

Permission denied

However if I removeIs this the symlink it just works normally.expected behaviour?

I have a folder hierarchy parent_folder -> inner_folder -> innermost_folder The steps I followed are (as a sudo user):

  • created a symlink pointing to parent_folder
  • set the permissions of the symlink to 0400 => chmod -h 0400
  • set the owner (of symlink) to root => chown -h root

Now I switch to normal user, ran ls -l in the folder which has the symlink, it throws error :

Permission denied

However if I remove the symlink it just works normally.

I have a folder hierarchy parent_folder -> inner_folder -> innermost_folder The steps I followed are (as a sudo user):

  • created a symlink pointing to parent_folder
  • set the permissions of the symlink to 0400 => chmod -h 0400
  • set the owner (of symlink) to root => chown -h root

Now I switch to normal user, ran ls -l in the folder which has the symlink, it throws error :

Permission denied

Is this the expected behaviour?

Post Reopened by nohillside
Post Closed as "Needs details or clarity" by nohillside
added 22 characters in body; edited tags; edited title
Source Link
anki
  • 11.9k
  • 7
  • 35
  • 71

Is the following behavior correct Permission denied for ls (Catalina)?-l in a folder with symlinks

I have a folder hierarchy parent_folder -> inner_folder -> innermost_folderparent_folder -> inner_folder -> innermost_folder The steps I followed are (as a sudo user): created a symlink pointing to parent_folder set the permissions of the symlink to 0400 => chmod -h 0400 set the owner (of symlink) to root => chown -h root

  • created a symlink pointing to parent_folder
  • set the permissions of the symlink to 0400 => chmod -h 0400
  • set the owner (of symlink) to root => chown -h root

nowNow I switch to normal user, try to do "lsran -l"ls -l in the folder which has the symlink ---, it throws error : Permission denied however

Permission denied

However if I remove the symlink it just works normally.

Is the following behavior correct (Catalina)?

I have a folder hierarchy parent_folder -> inner_folder -> innermost_folder The steps I followed are (as a sudo user): created a symlink pointing to parent_folder set the permissions of the symlink to 0400 => chmod -h 0400 set the owner (of symlink) to root => chown -h root

now I switch to normal user try to do "ls -l" in the folder which has the symlink --- it throws error : Permission denied however if I remove the symlink it just works normally.

Permission denied for ls -l in a folder with symlinks

I have a folder hierarchy parent_folder -> inner_folder -> innermost_folder The steps I followed are (as a sudo user):

  • created a symlink pointing to parent_folder
  • set the permissions of the symlink to 0400 => chmod -h 0400
  • set the owner (of symlink) to root => chown -h root

Now I switch to normal user, ran ls -l in the folder which has the symlink, it throws error :

Permission denied

However if I remove the symlink it just works normally.

Source Link

Is the following behavior correct (Catalina)?

I have a folder hierarchy parent_folder -> inner_folder -> innermost_folder The steps I followed are (as a sudo user): created a symlink pointing to parent_folder set the permissions of the symlink to 0400 => chmod -h 0400 set the owner (of symlink) to root => chown -h root

now I switch to normal user try to do "ls -l" in the folder which has the symlink --- it throws error : Permission denied however if I remove the symlink it just works normally.