0

Was just trying to learn and test on creation of symbolic link and relative symbolic link. I did the following command:

  1. ln -P /etc/passwd linkPassword
  2. ln -r -s /etc/passwd RlinkPassword

Both worked and the two link files are on my /root/Desktop/.

Now, I tried to delete them using unlink or rm but all permission denied even if using sudo.

Any help please?

0

I tried your commands, and had no issue deleting the link files using rm.

however, if you still have permission issue, try the below command

lsattr linkPassword

and see if it has letter i in it (it means immutable) in the output. If you see i, you have to remove this attribute first before you can delete those files.

chattr -i linkPassword
rm -rf linkPassword
| improve this answer | |
  • Hi FangQ, thanks for your suggestion but I can't seems to get that command running also. <br><br>[root@localhost Desktop]# lsattr linkPassword lsattr: Operation not supported While reading flags on linkPassword <br />[root@localhost Desktop]# chattr -i linkPassword chattr: Operation not supported while reading flags on linkPassword – NoobCyber Apr 6 at 3:06
  • then, you must have somehow removed the r/w permission. just do chmod +rwx linkPassword and then you can delete the file. – FangQ Apr 6 at 3:08

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.