LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-13-2011, 06:36 AM   #1
noony123
Member
 
Registered: Oct 2010
Posts: 167

Rep: Reputation: 0
File permission to specific user !


Hi all,

i have created a file (by root user) called test.txt. Then i created a user bob. Now i want only bob to read/write/execute this file and no other user shall have any permission on it.

How can i do it ?
 
Old 01-13-2011, 06:42 AM   #2
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,825
Blog Entries: 1

Rep: Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221
First you need to change the owner of the file to bob and then grant read/write/execute permissions only to the user (bob).
Have a look at the following article:
http://www.comptechdoc.org/os/linux/..._ugfilesp.html
 
1 members found this post helpful.
Old 01-13-2011, 06:42 AM   #3
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,564

Rep: Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901
Have a look at chown and chmod.
 
2 members found this post helpful.
Old 01-13-2011, 08:11 AM   #4
noony123
Member
 
Registered: Oct 2010
Posts: 167

Original Poster
Rep: Reputation: 0
Thanks a lot guys :-)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can i give directory permission to a group and not specific user? SamuraiCoder Linux - Newbie 5 05-26-2010 05:23 PM
C user function to check whether a given user has access permission to a file iamjayanth Linux - Software 2 10-07-2009 08:16 AM
Single, unmounted partition permission for a specific user? WetFroggy Slackware 1 08-26-2008 08:14 AM
permission to a specific user squirrel001 Linux - Newbie 8 02-07-2008 09:10 PM
user specific file access permission synna Linux - Security 3 01-14-2004 12:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration