LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-25-2008, 03:30 PM   #1
gatsby
Member
 
Registered: Jan 2006
Posts: 46

Rep: Reputation: 15
Set group on files as they are created


This is a file permissions question. I think umask fits in here somewhere, but I am not quite sure how.

Every time I FTP a file to my Linux machine, I end up overwriting the file permissions for the previous copy. I want my file settings to always be 664 in this directory. I also want the group ownership to always be defined as my group "testergroup". Does anyone know how I can accomplish this?

Thanks in advance.
 
Old 02-25-2008, 04:53 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
umask affects only permissions.

I just ran some tests. It seems that new files in a directory are created using the user's initial login group. I did this by creating a new user with only one group assigned. New directories or files created by that user all have that group assigned.

When a user is in multiple groups, I have not figured out how to change which is the "initial login group"----AHA--found it!!! change the group ID in /etc/passwd. (Group IDs can be found in /etc/group)
 
  


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
Files getting created with owner as nobody and group as nogroup, how to stop? itsakc Linux - General 2 10-25-2007 06:13 PM
ID created with assigned group is not display in /etc/group file dwarf007 Linux - Security 2 08-21-2007 10:39 PM
Automatically set permissions of new files created within a specific folder Lorian Linux - Desktop 2 03-03-2007 03:17 PM
How to permanently set permissions on all files created in a directory? BrianK Linux - General 8 06-24-2004 04:06 PM
[alert] (22) Invalid argument : setgid : unable to set group id to Group 4294967295 Niraj Linux - Networking 1 12-13-2001 06:58 AM

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

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