1

I have a collection of scripts that I'd like to make available to me across a variety of other user accounts that I use for running various gaming servers.

To do this I have previously used: ln -s /home/shared/scripts/ /home/other-user/symlink

This has worked out great as I have been able to run the scripts from the user cron and via SSH without issue.

I want to replicate that set up on a new server I am setting up but for the life of me I cannot get the symlink working.

I have tried running the above command on the main admin user, the shared user and the end user accounts (with and without sudo) and none of them give me the access I need. My CLI history for each user hasn't given me any clues to what I did differently 2 years ago either.

The script folder as viewed from the shared account looks like this: drwxrwxr-x 3 shared shared 4096 Aug 18 01:39 scripts/

Not sure what other info to add so feel free to ask if I have missed something.


Running namei -l /home/shared/scripts as shared returns:

f: /home/shared/scripts
drwxr-xr-x root      root      /
drwxr-xr-x root      root      home
drwxr-x--- shared    shared    shared
drwxrwxr-x shared    shared    scripts

Running ls -ld /home/shared as shared returns:

drwxr-x--- 5 shared shared 4096 Aug 17 22:44 /home/shared
Tony Merryfield
  • 161
  • 1
  • 1
  • 5
  • 2
    What do the _parent_ folders look like? Do `namei -l /home/shared/scripts` as well as `ls -ld /home/shared`. (Any reason to not just use /usr/local/bin for such tools?) – u1686_grawity Aug 18 '23 at 15:27
  • Would it be better to run from ```/usr/local/bin```? It never crossed my mind. Output from your commands in the original post now – Tony Merryfield Aug 20 '23 at 00:05
  • is `other-user` a member of the `shared` group? `/usr/local/bin` is for programs that any normal user may read+execute, but not edit, so it's good for shared scripts (as long as they don't write stuff to the same folder or contain credentials/secrets for example) – Cpt.Whale Aug 21 '23 at 16:03

0 Answers0