LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-28-2007, 08:50 AM   #1
George2
Member
 
Registered: Oct 2003
Posts: 354

Rep: Reputation: 30
Linux folder privilege issue


Hello everyone,


I have a directory (A) which is accessible (read and write) by user foo (non-root user), sometimes root user will create a sub-directory (B) under this directory. Then the user foo will not be able to access (read and write) the sub-directory (B) created by root user.

I am wondering whether there are any atomic ways to make the directory (A) and all its sub-directory (B) -- even B is created by root -- accessible (read and write) by a specific user foo (non-root user).

I am thinking about whether there are any ways to set directory A and all its sub-directory accessible by user foo, even if the sub-directories are created by root user and created later (dynamically) than the time when I assign the directory (A) accessible by user foo.


thanks in advance,
George
 
Old 04-28-2007, 09:56 AM   #2
jc_cpu
Member
 
Registered: May 2006
Distribution: Fedora 14
Posts: 71

Rep: Reputation: 15
Check out the documentation on the following commands:

1. chmod
2. chown

As far as I know, if root creates a directory, it will be owned by root. You could create a script that does the following:

1. Create a directory.
2. Change the group/owner to foo.

Instead of just creating the directory as root, you could run this script.
 
Old 04-28-2007, 11:05 AM   #3
gymnart
Member
 
Registered: Oct 2005
Distribution: SUSE 11.4
Posts: 331

Rep: Reputation: 30
I know that someone else will have a better way to do this but when I make stuff as root (like files or images), I always go and change the ownership to the non-root user/group. I do this in Konquerer using the submenu's properties items. -- Just a silly end-user way to do it.
 
  


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 issue "ls" command start with the largest file size in a folder? fjkum Linux - Newbie 5 07-27-2006 03:28 AM
Samba server folder access issue TruthSeeker Linux - Newbie 3 03-03-2006 01:59 AM
sound privilege LinuxWannaBE916 Linux - Newbie 2 03-29-2004 08:32 PM
Folder Permissions Issue Aman9090 Slackware 2 10-17-2003 11:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:31 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
Open Source Consulting | Domain Registration