LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-23-2002, 09:17 AM   #1
bspicer
LQ Newbie
 
Registered: Apr 2002
Posts: 26

Rep: Reputation: 15
File Permissions


I have a directory structure that is tied to a group called eci. Any new file created has the eci group. We have an automated process that ftp's data to the server and then our application then reads the files and renames them.

The problem I'm having is the file comes in with the permissions rw r r . I need to to come in with rw rw r so the app can rename the file. My umask is 022 and I don't see this being set in my /dev/profile.

How can I set this so any new files have the proper permissions.

I would really like everything to be rwx rwx rwx as it seems our vendor is always having us do this to all files to get the thing to run correctly. Might as well make that the default.

Thanks.

Bill
 
Old 12-23-2002, 01:10 PM   #2
deadbug
Member
 
Registered: Oct 2002
Location: San Antonio, Texas
Distribution: MDK 8.0, 9.0; RH 7.2, 8.0, 9.0, FC3, FC4, FC5
Posts: 355

Rep: Reputation: 30
From: http://unixhelp.ed.ac.uk/CGI/man-cgi?umask+2

DESCRIPTION
umask sets the umask to mask & 0777.

The umask is used by open(2) to set initial file permis-
sions on a newly-created file. Specifically, permissions
in the umask are turned off from the mode argument to
open(2) (so, for example, the common umask default value
of 022 results in new files being created with permissions
0666 & ~022 = 0644 = rw-r--r-- in the usual case where the
mode is specified as 0666).

At: http://www.php.net/manual/en/function.umask.php

there is an explanation on how umask interacts with the current directory settings. Given that your result mirrors the standard one in the previous example (you're ending up with 0644 after umask changes it by 0022), you are probably starting with a directory setting of 0666 ( rw rw rw).

To have the file come in with rw rw r, change umask to 0002. 0000 would leave it rw rw rw.

As far as having everything come with all permissions open, rwx rwx rwx, maybe someone else can help. I'm not sure if setting the directory's permissions to rwx rwx rwx would transfer that to the files created in that directory since the x at the directory level has a different meaning than it does at the file level.
 
Old 12-23-2002, 06:57 PM   #3
deadbug
Member
 
Registered: Oct 2002
Location: San Antonio, Texas
Distribution: MDK 8.0, 9.0; RH 7.2, 8.0, 9.0, FC3, FC4, FC5
Posts: 355

Rep: Reputation: 30
I also found this post in another section. The folks here would prefer that you do not double post (one of thse rule things)
 
  


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 On
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 12:00 PM
locking a usage policy file/ftp file permissions gbow Linux - Newbie 0 02-16-2004 05:35 AM
CVS - file permissions and file ownership Osten Linux - Software 3 01-18-2004 04:08 PM
file permissions and file owner won't change Nadim Slackware 5 11-29-2003 06:03 PM
Changing file permissions on a SAMBA file share apenney Linux - Software 0 02-11-2002 04:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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