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 - 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 05-12-2004, 12:03 AM   #1
salieg
LQ Newbie
 
Registered: May 2004
Location: Cape Town - South Africa
Distribution: Fedore
Posts: 1

Rep: Reputation: 0
How does one force directory permissions for existing/new files


When a directory is created how does one have group attributes one the directory filter into the sub-folders and files in that directory
 
Old 05-12-2004, 12:22 AM   #2
Axion
Member
 
Registered: Jan 2003
Location: Albany, NY
Distribution: Slackware 9.1, Gentoo 2004.1
Posts: 153

Rep: Reputation: 30
chown -R username.groupname /path/to/files

the -R stands for recursive and will change the ownership on all of the subdirectories and files.
 
Old 05-12-2004, 12:58 AM   #3
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
Is this a networked directory mounted via SAMBA? Is it a native partition (meaning part of the / tree), or is it mounted via /etc/fstab or manually? What filesystem is it?

There are slightly different methods to do this depending on the answers to these questions.
 
Old 05-12-2004, 06:58 AM   #4
adamwenner
Member
 
Registered: Aug 2003
Distribution: windows xp home, windows 98, red hat 9, fedora core 3, redhat enterprise linux, win2000 pro/server
Posts: 217

Rep: Reputation: 32
if you want any files that are new to be owned by the same directory its in, set the directory as sticky

if the directory is owned by foo
chmod the directory to g+s so that the new files will be owned by the same person as the directory

also works for user
u+s
 
  


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
Apply permissions to all files in a directory leonard.sokol Linux - General 4 07-02-2005 08:09 PM
how to check existing directory? izza_azhar Programming 1 04-15-2005 05:09 AM
Changing file permissions within a directory for all files. cajunaggie Linux - Newbie 2 02-06-2005 01:53 AM
How to permanently set permissions on all files created in a directory? BrianK Linux - General 8 06-24-2004 04:06 PM
recursive file permissions does not change new files in same directory PAB Linux - Newbie 2 03-08-2004 12:27 PM

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

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