I have created a file named *.txt
in /home
using following command:
sudo nano *.txt
Then I have changed owner of *.txt
to a user
that I've created:
sudo useradd -c "ABC"
sudo chown ABC *.txt
I login to ABC
by typing:
sudo login ABC
I tried to change permission of the file:
sudo chmod 777 *.txt
This is the result:
ABC is not in the sudoers file. This incident will be reported.
Permissions have successfully changed when running chmod
from the original user: batman
.
How can I change the permissions of *.txt
from the new owner?
sudo
in Ubuntu you need to be in thesudo
group (or you need to be in the sudoers file like the error suggests); 3. you're getting "no such file or directory" because you forgot tocd
to the right directory – Andrea Corbellini Mar 21 '16 at 17:30cd ~batman; chmod 744 *.txt
-- but you may get errors depending on the directory permissions – Andrea Corbellini Mar 21 '16 at 17:36ABC
user is the new owner of this file. Right? How can I fix it ? – Johny Nassar Mar 21 '16 at 17:39