Please help with this command...unable to get it

Permission: Assignment - Nobody other than owner can read the file
Create a new file called myemptyfile. You can use:

touch myemptyfile
Check its permissions using:

ls -l myemptyfile
Using chmod, give it permissions such that nobody other than owner of a file can read the file.

Hi Atif, thanks for your question.
For questions involving setting permissions, you can use the options available for the chmod command. For example, for giving “execute” permission to the user, on a file called “myfile.txt” you can run the command chmod u+x myfile.txt.
Similarly, for changing permissions for groups and others, you can use the appropriate option along with the g and o option.
Here are a few examples -

  • chmod u+x,g+r myfile.txt will give execute permission to user and read permission to group on the file
  • chmod u+w,g-w,o-w myfile.txt will give write permission to user and remove write permission from group and others.

I hope this explanation will help you in solving the exercise.
Happy Learning!

Still i am getting error

Question is as follows

Create a new file called myemptyfile. You can use:

touch myemptyfile
Check its permissions using:

ls -l myemptyfile
Using chmod, give it permissions such that nobody other than owner of a file can read the file.

Please use the full name of the file using its extension. Here you are running chmod on emptyfile. And also look at the permissions after running chmod to verify, using ls -l command.

Still error cloudxlab interface

Hi Atif, please note that the exercise says to create a file called “myemptyfile” and then set the permissions on it. Since the evaluator is searching for a file named myemptyfile which it cannot find, hence it is showing the error.

Thanks Sharukh for helping. Its working fine.