LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 01-26-2010, 02:12 PM   #1
MT_Keg
LQ Newbie
 
Registered: Aug 2009
Location: TN
Distribution: Debian/Fedora/OS X
Posts: 25

Rep: Reputation: 15
creating a directory in /usr/local


how could I create a directory in /usr/local such that only certain group or user could have read write and execute privileges?

MT
 
Old 01-26-2010, 03:00 PM   #2
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
As root create the directory:
mkdir /usr/local/foo

Allow everyone browsing the directory:
chmod ugo+rX /usr/local/foo

To allow to just the user write/execute:
chown -R <alloweduser>:root /usr/local/foo/*
chmod -R u+rxw,go-rwx /usr/local/foo/*

To allow to just the user+group write/execute:
chown -R <alloweduser>:<allowedgroup> /usr/local/foo/*
chmod -R ug+rxw,o-rwx /usr/local/foo/*

To achieve this you must chown/chmod each file in the foo directory. Permissions on a directory do not restrict execution.

jlinkels
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to allow users to access files in /usr/local/<directory> vitalstrike82 SUSE / openSUSE 3 03-26-2008 10:04 PM
including usr/local/lib directory Quest101 Linux - Software 3 01-01-2005 04:13 PM
Installing software, /usr/lib directory and /usr/local millertime Linux - Software 2 07-10-2004 09:21 AM
Why is the directory called /usr/local. jschiwal Linux - General 6 06-30-2004 02:05 PM
/usr/local/vmware ?? directory change!! paulo Linux - Security 4 07-09-2003 08:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 01:52 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