Take the 2-minute tour ×

There is one user Lets call him B and he needs access Just to Read the File MEANS READ ACCESS and that file is own by another user A .

How can I grant access to user A's file to User B.

share|improve this question
Are you using Samba? –  Achu Nov 7 '12 at 11:15
No dear its just fresh system. Nothing installed Yet. –  OmiPenguin Nov 7 '12 at 11:18
add comment

1 Answer

That depends on A's group and B's group. If they are in the same, you need to check group permission (middle of the permission line) are enabling reading :


Here, user can read and write, group can only read, and other can only read.

If A and B are not in the same group, then B have the other permissions, and you need to set those to read.

Reminder: to change a file permission, open a terminal (Ctrl+Alt+T) and type

chmod g+r myFile

g means group, but it can be u for user or o for other. rmeans read, and it could be replace by wfor write or x to execute.

share|improve this answer
Thnx for info. Tell me should i set it on User level or Group level ??because both are in different group. 2:Can root user do this if owner of user is not available if Yes then HOW. 3:And when this is done how to access the file. Sorry for troubling u as this is my first time with FILE SHARING THING IN LINUX –  OmiPenguin Nov 7 '12 at 11:17
1. If it's A's file, user only impact A. If they are in different groups, you should set other permissions: chmod o+r myFile. 2. Yes, you can change permission with root user, just sudo the command. 3. Once you can read it, you can open it with any application. I recommend cat or vim. Let me know if it worked ! –  NorTicUs Nov 7 '12 at 11:23
Ok i have set the privilege of A's file to Read by using chmod o+r using ROOT account. Now how to access this file using User B –  OmiPenguin Nov 7 '12 at 11:27
by passing the command ls /home/mra/Desktop/new file It gave me following output -rw----r-- 1 mra mra 26 Noc TIME /home/mra/Desktop/newfile Now advice me how to access this file from User B's account . Thanx man –  OmiPenguin Nov 7 '12 at 11:43
Just log in with B's session, or use su B to substitute B's identity in a terminal and open the file like cat /home/mra/Desktop/newfile. You should see the content of your file displayed in the terminal. –  NorTicUs Nov 7 '12 at 12:10
show 1 more comment

Your Answer


