I'm trying to create a soft link for a file but keep getting a permission denied message. I don't want to create it under the root user but a different user I have created. This user has rwx permissions for the file and I'm wondering what else I could be missing to have permission denied. The command I'm using is

ln -s /home/MarxBros/marx1.txt /marx1.lnk 

The user has rwx for marx1.txt and the /home/MarxBros directory.

1 Answer 1


The syntax that you are using:

ln -s /home/MarxBros/marx1.txt /marx1.lnk

is attempting to create the directory in / as in /mark1.ink.

That isn't going to work because only root has write access to / as you can verify with ls -ld /

In order for what you are doing to work, you need to create the link in a location in which the user has modify access.

  • This 100% solved the problem. I've only had practice creating soft links in the root directory. As a basic user, what would an example of syntax for a hard link be? Mar 6, 2022 at 21:26
  • Creating a hard link is just like creating a softlink but without the -s flag.
    – frabjous
    Mar 6, 2022 at 21:35
  • Oh, and if this 100% solved your problem, you should accept it as correct.
    – frabjous
    Mar 6, 2022 at 21:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .