I have a file called test.sh
. I've used chown
to set it's owner to user1
.
chown user1 test.sh
Then I play with chmod options to see if I understand them correctly.
chmod 400 test.sh
I can read the file but cannot modify or execute it.
chmod 200 test.sh
I can modify the file through command line but cannot read or execute it.
chmod 100 test.sh
I should be able to execute but not modify or read the file. But I get a permission denied error everytime I try to execute without sudo.
What am I doing wrong here?