Some questions about file permissions.


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Some questions about file permissions.
# 1  
Old 12-11-2008
Some questions about file permissions.

Hi, what happens in these scenarios?

1. You give no permissions to "others" on a directory, but in that directory the files have read permissions for "others", can they read the file?

2. Are files with rwx attributes to "others" at risk of being copied or read on the system, even if you are the only physical user? (i am running a web server as well)

3. Also when I type "ls -l" after I have changed some file permissions, why are there still some temp files with the old permissions?
e.g:
rwxrwx--- fileone.php
rwxrwxrwx fileone.php~

Thanks

Last edited by daydreamer; 12-11-2008 at 05:06 PM..
# 2  
Old 12-11-2008
1. No, because they can't get into the directory to access the file.
2. If someone finds a vulnerability they can exploit on your system, then it increases the chances that they can overwrite your files. It's up to you to assess that risk based on the importance of the information in the files and whether or not modifying those files gives someone a way to access even further information on your system.
3. I presume those backup files are created by your text editor? Strange that they are created with rwxrwxwrx, perhaps your umask is set to 000 instead of the usual 022?
# 3  
Old 12-12-2008
For second point,
If you ought to give rwx permission to the file, then better add a sticky bit the directory which contains that file. So no one other than you can edit or delete the file.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Changing file permissions of a file created by another user

Hi, I have used expdp for datapump. The .dmp file is created by the "oracle" user. my requirement is to make a zipped file of this .dmp file. What i am trying to do is change the permissions of this .dmp file from 0640 to 0644 and then do a gzip and zip it. Is there any way i can change... (3 Replies)
Discussion started by: qwertyu
3 Replies

2. Shell Programming and Scripting

ksh; Change file permissions, update file, change permissions back?

Hi, I am creating a ksh script to search for a string of text inside files within a directory tree. Some of these file are going to be read/execute only. I know to use chmod to change the permissions of the file, but I want to preserve the original permissions after writing to the file. How can I... (3 Replies)
Discussion started by: right_coaster
3 Replies

3. Solaris

file permissions

There is the following file in my filesystem (VXFS) shown by "ls -l" command: ---s--l--- 1 user group 0 Mar 26 16:13 file.tmp What does "l" bit mean in these permissions? This is SunOS 5.10: $ uname -a SunOS hostname 5.10 Generic_144488-03 sun4u sparc SUNW,SPARC-Enterprise ... (2 Replies)
Discussion started by: darkshine
2 Replies

4. Homework & Coursework Questions

Print questions from a questions folder in a sequential order

1.) I am to write scripts that will be phasetest folder in the home directory. 2.) The folder should have a set-up,phase and display files I have written a small script which i used to check for the existing users and their password. What I need help with: I have a set of questions in a... (19 Replies)
Discussion started by: moraks007
19 Replies

5. UNIX for Dummies Questions & Answers

File Permissions

Hi, How to give a read permission to a particular file for a non-root user? Ex: The below file owner is oracle but how can i add\remove permission for another user. -rw-r--r-- 1 oracle dba 1540330 Dec 21 2005 ojdbc14.jar ~Vinodh' Kumar (4 Replies)
Discussion started by: vino_hymi
4 Replies

6. Filesystems, Disks and Memory

Regarding File permissions

Hi, I have a shellscript.I want to protect the source code. So I gave 711 permission on the file(owner=rwx,group=x,others=x) but still others are not able to execute it. Please help me in protecting the source code.I don't want others to use any cat or vi command on the script but... (1 Reply)
Discussion started by: bishnu.bhatta
1 Replies

7. HP-UX

File with no permissions

All, I have a very strange situation here. I have a server with 2 filesystems for 2 different users. The filesystem my user id is part of is copying a file with permissions 666 to the other filesystem - the files copied are owned by my userid. Sometimes, the file will be copied and when... (8 Replies)
Discussion started by: simshark
8 Replies

8. AIX

File Permissions nobody:nobody

AIX 5.3 environment. On the local system, I am sharing a jfs2 filesystem as an exported filesystem. I have many other AIX 5.3 server mounting to this file system and can create, move, copy, ... data to and from this share. Recently, we've run into a problem. When on another system (okay, all... (5 Replies)
Discussion started by: clking
5 Replies

9. Shell Programming and Scripting

Retain file permissions when saving .sh file from internet [OS X]

Hello. I have written a bash script that I am sharing with an OS X community I am a member of. The purpose of the script is to execute a series of commands for members without them having to get involved with Terminal, as it can be daunting for those with no experience of it at all. I have renamed... (4 Replies)
Discussion started by: baza210
4 Replies

10. HP-UX

To give the "unzip" permissions & "create" file permissions

Hi, I am a Unix Admin. I have to give the permissions to a user for creating new file in a directory in HP-Ux 11.11 system since he cannot able to create a new file in the directory. Thanks in advance. Mike (3 Replies)
Discussion started by: Mike1234
3 Replies
Login or Register to Ask a Question