LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices



Reply
 
Search this Thread
Old 06-29-2006, 04:11 PM   #1
Hardip
LQ Newbie
 
Registered: Feb 2006
Posts: 6

Rep: Reputation: 0
Inheriting file permissions


I have just moved our documents folder to a linux box from windows. This folder contains numerous other folders and files for our association. All these folders, subfolders and files are to be accesed by our accounts group. How can I set these permissions. Do I have to set them on individual files or is there a command I can use ??
By the way, I am a newbie on this issue and a recent linux convert
 
Old 06-29-2006, 04:21 PM   #2
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
man chown and man chmod will both help. I think to make them all owned by the accounts group you would do chown -R :accounts /path/to/directory as root. This would change ownership of all files and directories to the accounts group. Then you'll want to set the permissions so that anyone in group account has read write access. So as root, you would do chmod -R g+rw /path/to/directory.
 
Old 06-29-2006, 04:27 PM   #3
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 59
use the 'chgrp' command to change file group ownership, with the -R option to change ownership to all subdirectories and their contents. ie:
Code:
chgrp -R accounts /.../Documents/
also use the 'chmod' command to change file access modes. use the '-R' option as well. to give all access to the group and remove access to all other users, a command like this should work:
Code:
chmod -R a-rwx g+rwx
if thats what you want.. otherwise let us know

Last edited by nadroj; 06-29-2006 at 04:30 PM.
 
Old 07-03-2006, 12:48 AM   #4
Hardip
LQ Newbie
 
Registered: Feb 2006
Posts: 6

Original Poster
Rep: Reputation: 0
Inheriting file & folder permissions.

Thanks a pile. The permissions have been set as I need them, however whenever I open any excel or word file from my Documents folder on the Linux box, I always opens as a 'read only' file, altought I have set the permissions of the accounts group as read & write. Why is this ??. Is there a setup problem with my samba service ??
 
Old 07-03-2006, 12:56 AM   #5
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 59
i didnt know samba was involved.. is it on a partition that is mounted read only? or on an ntfs partition? in which case you wouldnt want to write to it in linux
 
  


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
file permissions OK, but command permissions? stabu Linux - General 2 10-05-2005 01:00 PM
inheriting permissions steve007 Linux - Security 3 07-06-2005 12:09 AM
locking a usage policy file/ftp file permissions gbow Linux - Newbie 0 02-16-2004 06:35 AM
can't use protected inner class when inheriting the outer Dominik Programming 6 02-02-2004 02:12 AM
Inheriting a network adminís job wedgeworth Linux - Software 1 10-10-2003 05:08 PM


All times are GMT -5. The time now is 08:39 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration