It sounds like the folder is not owned by your user, so you can't write to it - to sort this out either run this for a file:
sudo chown USERNAME:USERNAME /PATH/TO/FILE
or this for a folder/directory:
sudo chown -R USERNAME:USERNAME /PATH/TO/FOLDER
These commands will make the user USERNAME
and group USERNAME
the owner of the file or folder specified.
Alternately, you could just make 'Other' users have access to the file:
sudo chmod 766 /PATH/TO/FILE
or folder:
sudo chmod -R 766 /PATH/TO/FOLDER
Here are manual pages on chmod
and chown
You can check the permissions of the contents of a folder by running:
ls -l /PATH/TO/FOLDER
You should get something like this:
drwxr-xr-x. 2 wilf wilf 4096 Jan 10 15:59 Desktop
drwxr-xr-x. 2 wilf wilf 4096 Jan 10 00:32 Documents
drwxr-xr-x. 3 wilf wilf 4096 Jan 10 18:25 Downloads
-rw-rw-r--. 1 wilf wilf 70582 Jan 11 22:22 gnomeRemove.txt
Where the drwxr-xr-x.
is a d
irectory with r
ead and ex
ecute permissions to all users, with w
rite permissions for the owner.
Your username should also be in place of wilf
.
sudo ls -l /PATH/TO/CONTAINING/FOLDER
, and add it to your question.