Permission Denied

When I try to copy or move a file into any directory, it keeps saying “Permission Denied” I tried it many times.
here’s the output :

HOUSAL@HOUSAL-PC:~$ ls

bin Documents file.txt Music Pictures Videos
Desktop Downloads javasharedresources opt sal xdm_1%3a1.1.11-3_amd64.deb

HOUSAL@HOUSAL-PC:~$ mv file.txt /sal

mv: cannot move ‘file.txt’ to ‘/sal’: Permission denied

HOUSAL@HOUSAL-PC:~$

Hello and welcome.
First of all: What’s this directory “sal”?
Have you created it?
From your output it seems that you are in your home directory.
So you’re trying to copy that file into the root ("/") directory into a directory there (“sal”).
There you have no permissions as a normal user.
You could do that with “sudo” in front of the mv command.

But be careful. What are you going to achieve with it? Or is it just for practice?

3 Likes

Hello!
First of all, welcome to the ITSFOSS COMMUNITY!

Can you try moving it to another folder?
Or
Try using sudo mv
sudo stands for super-user-do which will do any action as an Admin

It will also ask you for your password as you are doing it as an administrator.

Hope it helps!
Thanks for reading!!!

Thanks a lot for your help

@HOUSAL ,
The /sal directory needs to have its permissions changed.
Look at
man chmod
and learn how to set permissions.

Also, as @Fast.Edi noted, /sal is in the root directory… What is it? Is it maybe a mount point? Are you supposed to be writing there?

Neville