Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Default read/write/execute permissions Post 302228788 by joeyg on Monday 25th of August 2008 12:22:10 PM
Old 08-25-2008
Question Default read/write/execute permissions

I am perplexed that my script execution is not always consistent in creating new files. Specifically, my group read/write/execute permissions. For instance, take a look at the following:

Code:
-rw-rw----   1 jg   dp  18648 Aug 22 10:06 nx081508.txt
-rw-rw----   1 jg   dp  22422 Aug 22 10:06 nx081808.txt
-rw-rw----   1 jg   dp   6993 Aug 22 10:06 nx081908.txt
-rw-rw----   1 jg   dp  25308 Aug 22 10:06 nx082008.txt
-rw-rw----   1 jg   dp  15873 Aug 22 10:06 nx082108.txt
-rw-rw----   1 jg   dp  95319 Aug 22 10:06 nx082208.all
-rw-r-----   1 jg   dp  88911 Aug 22 10:06 nx082208.txt
-rw-rw----   1 jg   dp  94518 Aug 22 10:06 nx082208.uid

One of my .txt files does not have group 'w' access. And this can become a problem is another user needs to do something with that file.

I know, I could have my script do a chmod to the *.txt files after it is done, but that seems silly.

So, any idea where this might be set such that users sometimes set correctly and sometimes not?
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

help with permissions - execute but not delete

Hi, We have 2 users and one directory (dir). One user is admin user and other use r is operator user. who is responsible for just executing the scripts e.g. startWeblogic and stopWeblogic etc, we want to restrict this operator user in such a way that he can only execute these files and he should... (2 Replies)
Discussion started by: reldb
2 Replies

2. UNIX for Dummies Questions & Answers

Newly created files default group and write permissions

Whenever I create a new file the group name is "dnn" and the file permissions are "-rw-r--r--". How do I get it so when I create files (with vi or other programs) that the default group is "sss" and the permissions are 770? (I am running HP-UNIX) Thanks, GoldFish (2 Replies)
Discussion started by: goldfish
2 Replies

3. UNIX for Dummies Questions & Answers

Running file without execute permissions

Please explain this strange behavior to me bash-2.03$ ls -l abc -rw------- 1 bashboy users 319 Sep 21 18:02 abc bash-2.03$ ./abc bash: ./abc: Permission denied bash-2.03$ . abc Successfully run I wanted to ask how the file executes without the execute permissions when we... (3 Replies)
Discussion started by: rakeshou
3 Replies

4. UNIX for Dummies Questions & Answers

About read,write & execute permissons of a directory

Hi all, I want to know differences between read,write & execute permissons given to directory. Thanx in advance. (6 Replies)
Discussion started by: vishwasrao
6 Replies

5. IP Networking

read/write,write/write lock with smbclient fails

Hi, We have smb client running on two of the linux boxes and smb server on another linux system. During a backup operation which uses smb, read of a file was allowed while write to the same file was going on.Also simultaneous writes to the same file were allowed.Following are the settings in the... (1 Reply)
Discussion started by: swatidas11
1 Replies

6. Solaris

Why user has permissions to execute 'init 0'?

Hi all. On one workstation run Solaris 10 a simple user can to execute 'init 0' command without input (su and root password). Example: % init 0 % OK I don't understand how user can execute 'init 0' command on this workstation? 1) I checked /usr/local/etc/sudoers all lines are... (6 Replies)
Discussion started by: wolfgang
6 Replies

7. Solaris

add a ftp user with read and write permissions on a directory

hi all how I can create an ftp user in solaris 10 and have read and write permission on a directory. Thanks. (1 Reply)
Discussion started by: luisfja
1 Replies

8. Shell Programming and Scripting

perl script to check read/write/execute permission for 'others'

I want to check access rights permissions not for 'user', not for 'group', but for 'others'. I want to do it by system command in which i want to use 'ls -l' and 'awk' command. I have written the following program : #!/usr/bin/local/perl #include <stdlib.h> system ("ls -l | awk... (1 Reply)
Discussion started by: shubhamsachdeva
1 Replies

9. UNIX for Beginners Questions & Answers

How to give permissions to read write but not delete the file?

i want to give users the ability to create write and read files in other user directory , but not to have option to delete the file after created ( sticky bit not going to work here ... ) for example : i have user : manager with directory repository i have user : worker1 that need to write... (4 Replies)
Discussion started by: umen
4 Replies
CHMOD(1)						      General Commands Manual							  CHMOD(1)

NAME
chmod - change mode SYNOPSIS
chmod mode file ... DESCRIPTION
The mode of each named file is changed according to mode, which may be an octal number or a symbolic change to the existing mode. A mode is an octal number constructed from the OR of the following modes. 0400 read by owner 0200 write by owner 0100 execute (search in directory) by owner 0070 read, write, execute (search) by group 0007 read, write, execute (search) by others A symbolic mode has the form: [who] op permission The who part is a combination of the letters u (for user's permissions), g (group) and o (other). The letter a stands for ugo. If who is omitted, the default is a. Op can be + to add permission to the file's mode, - to take away permission, and = to assign permission absolutely (all other bits will be reset). Permission is any combination of the letters r (read), w (write), x (execute), a (append only), and l (exclusive access). Only the owner of a file or the group leader of its group may change the file's mode. SOURCE
/sys/src/cmd/chmod.c SEE ALSO
ls(1), stat(2), stat(5) CHMOD(1)
All times are GMT -4. The time now is 09:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy