0

I am login with the account name debian7.
An error occur : Permission denied when to copy and paste file into the directory /home/tom .

ls  -al  /home/tom
total 28
drwxrwxr-x 2 tom  tom  4096 Jul 30 21:26 .
drwxr-xr-x 9 root root 4096 Aug  8 08:19 ..
-rwxrwxr-x 1 tom  tom   220 Jul 30 21:24 .bash_logout
-rwxrwxr-x 1 tom  tom  3392 Jul 30 21:24 .bashrc
-rwxrwxr-x 1 tom  tom   675 Jul 30 21:24 .profile
-rwxrwxr-x 1 tom  tom    12 Jul 30 21:26 test.txt
-rwxrwxr-x 1 tom  tom   602 Jul 30 21:26 .viminfo

The account name debian7 has the privilege in my sudoers.

# User privilege specification
root    ALL=(ALL:ALL) ALL
debian7   ALL=(ALL:ALL) ALL

Why can't copy and paste file into the directory /home/tom ?

1 Answer 1

2

Having privileges in the sudoers file onlc configures the use of the sudo command. It does not let you configure to run commands with root elevation without using sudo.

So your user is entitled to do everything as root, but this is not being done automatically. The only user that can read and write everything still is root, and only root.

So you still need sudo in order to access files of another user.


Alternatively, add debian7 to the group tom. As you have group write permissions set, you will then be able to read and write into the other user's home:

sudo usermod -a -G tom debian7

You must log in to answer this question.

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