Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 02-25-2008, 04:30 PM   #1
Registered: Jan 2006
Posts: 59

Rep: Reputation: 16
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, 05:53 PM   #2
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,803

Rep: Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742
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)


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

All times are GMT -5. The time now is 12:40 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration