LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-01-2012, 08:04 AM   #1
sabarishsubramanian
LQ Newbie
 
Registered: Sep 2011
Posts: 7
Blog Entries: 1

Rep: Reputation: Disabled
File permissions


Hi everybody.Can someone tell how to set the file permission for a particular user in linux???
 
Old 02-01-2012, 08:36 AM   #2
edgardl
LQ Newbie
 
Registered: Feb 2012
Location: Mexico
Distribution: Debian
Posts: 9

Rep: Reputation: Disabled
Hi

You could use chmod command, depending of the kind of permission you need, for example

$chmod a+x file

this would set execute permission for all, however you can change "a" by u (owner), g (group)or o (others)
Furthermore we have r (read), w (write) or x (execute)

You should take a look at man chmod
 
Old 02-01-2012, 08:49 AM   #3
eleljrk
LQ Newbie
 
Registered: Feb 2010
Location: Norway
Distribution: Ubuntu
Posts: 2

Rep: Reputation: Disabled
chown or chmod are the commands you seek. Try -?, -h or --help for more information.
 
Old 02-01-2012, 08:40 PM   #4
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940Reputation: 3940
Many filesystems support access control lists (ACLs), which, when they are used, effectively supersede the traditional -rwxrwxrwx permissions mask. However, they are not entirely standardized as to their format or their capability. You might be able to get some good out of PAM, but I am truly not knowledgeable on this point.
 
Old 02-02-2012, 10:12 AM   #5
sabarishsubramanian
LQ Newbie
 
Registered: Sep 2011
Posts: 7

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
hi everybody i need to set the permission for a particular user with their id
 
Old 02-03-2012, 12:04 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
As you were told, look into chown http://linux.die.net/man/1/chown & chmod http://linux.die.net/man/1/chmod.
Taking you literally ie perms not ownerships, then chmod is the one.
 
Old 02-04-2012, 06:26 AM   #7
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS, CloudLinux
Posts: 377

Rep: Reputation: 10
Quote:
Originally Posted by sabarishsubramanian View Post
hi everybody i need to set the permission for a particular user with their id
i think you mean a permission like a user can install programs or issue the particular commands.in this case you should user sudo.
its file is located in /etc/sudoers.there's good comment in that file.if you didn't understand the syntax, do tell.
 
Old 02-04-2012, 07:20 AM   #8
lwasserm
Member
 
Registered: Mar 2008
Location: Baltimore Md
Distribution: ubuntu
Posts: 184

Rep: Reputation: 41
as already noted, chown will set the permissions of an existing file. Perhaps you mean to set the file permissions used by default when a user creates a file. If so, bash and probably most other shells have a "umask" builtin command, and it can also be used in your .bashrc file.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot change file permissions on a mounted file system koodoo Linux - Newbie 2 04-06-2010 11:22 PM
File permissions v. directory permissions Completely Clueless Linux - Newbie 7 07-09-2009 08:33 AM
file permissions OK, but command permissions? stabu Linux - General 2 10-05-2005 12:00 PM
locking a usage policy file/ftp file permissions gbow Linux - Newbie 0 02-16-2004 05:35 AM
Changing file permissions on a SAMBA file share apenney Linux - Software 0 02-11-2002 04:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:06 PM.

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
Open Source Consulting | Domain Registration