System Info:
I have normal user in CentOS 7 whose name is "mostafa" (the name of the account).
I naturally have another user called root with all privileges. User "mostafa" is put into sudoers file, too.
The OS is installed in VmWare, so the system is all mine.
Problem:
Now I create a file with touch file.sh and put a command in it, but when I want to run it with
Code:
sudo ./file.sh
, an error is shown that the command
Code:
./file.sh
does not exist. But if I
Code:
sudo chmod 777 ./file.sh
then it gets run. My question is that, why should I use
Code:
chmod 777
when I myself have created the file, and I am in sudoers.
Can anyone explain me why shuold I still use
Code:
sudo chmod 777
when the creator of the file is me.