I'm trying to answer the following question about file permissions in Unix. Consider a file with the following permissions:
rwx---r--
I am not the owner of this file, but I am a member of the group of this file.
My question is: do I have read access to this file?
I thought... (3 Replies)
netjk@rediffmail.com
I have a Shell Script (wrapper) that gathers parameters and invoke a base script (lets say B1). I have set the permission for this script as 711 (execute for everyone, group). When a user from another group try to execute the script, permission is denied (Cannot open file..)... (1 Reply)
Hi all,
ok here is my problem, my program below is reading lines in from a file (one at a time) and printing them out. my problem is that i want it to only print out 3 lines at a time on the screen, but the "read value" command in my code isnt working. Whats wrong? & what can i do to get this... (1 Reply)
Hello all,
I need to write a little unix script to do some work on multiple files. I need to enter the filenames from the command line (scriptname <filename> <filename>. I have written the code to do double spacing, and some line numbering but it does not take multiple files from the command... (1 Reply)
Hi,
I am fairly new to Unix. My school computers have only UNIX installed on them, and I wish to use them to do some parallel computing. To do so, I need to transfer the files from my Windows computer to my Unix account on a different computer.
I am using the SSH login with the Putty client.... (2 Replies)
Dear all,
I got some questions abt how does the Unix kernel work
with the work with the other components. (step by step)
Can any body tell me some info abt that? if can provide
a example for each question that gonna be perfect!
Thank you!!!
1. How file management system work together... (2 Replies)
Hello all,
I am trying to write a simple script that will parse through a text/properties file and check a couple of if statements.
Here is what I have so far:
FILENAME=$1
while read line
do
echo $line
done < $FILENAME
When I call ./simple.sh testfile.txt I recieve a file or... (7 Replies)
I am trying to FTP files from windows to UNIX (IBM AIX). After having sent the files to unix server. Permisssion of the files becomes 640 (rw-r-----). I have to manually login to unix and do chmod 644 on the folder to give it permission. Is it possible that the files automaically be set to 644 on... (2 Replies)
Hi ,
I just write a simple function to read the file line by line.
But when I run it it says out of memory.
I am not sure about the root cause, Can someone help me out of this?
:D
#! /usr/bin/perl
use strict;
sub checkAPs{
my $NDPDir = "/home/eweiqqu/NCB/NDP_files/";
... (1 Reply)
Experts: i want to change this permission back to the way it was:
Initial:
drwxr-xr-x 8 oracle oinstall 4096 Jun 5 15:21 oracle
Now: drwxr-xr-x 8 oracle oinstall 4096 Jun 5 15:21 oracle
drwsr-sr-x 8 oracle oinstall 4096 Jun 5 15:21 oracle
Now I want to switch it back to ... (2 Replies)
Discussion started by: sumang24
2 Replies
LEARN ABOUT BSD
chmod
CHMOD(1) General Commands Manual CHMOD(1)NAME
chmod - change mode
SYNOPSIS
chmod [ -Rf ] mode file ...
DESCRIPTION
The mode of each named file is changed according to mode, which may be absolute or symbolic. An absolute mode is an octal number con-
structed from the OR of the following modes:
4000 set user ID on execution
2000 set group ID on execution
1000 sticky bit, see chmod(2)
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 [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 all, or ugo. If
who is omitted, the default is a but the setting of the file creation mask (see umask(2)) is taken into account.
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), X (set execute only if file is a directory or some other
execute bit is set), s (set owner or group id) and t (save text - sticky). Letters u, g, or o indicate that permission is to be taken from
the current mode. Omitting permission is only useful with = to take away all permissions.
When the -R option is given, chmod recursively descends its directory arguments setting the mode for each file as described above. When
symbolic links are encountered, their mode is not changed and they are not traversed.
If the -f option is given, chmod will not complain if it fails to change the mode on a file.
EXAMPLES
The first example denies write permission to others, the second makes a file executable by all if it is executable by anyone:
chmod o-w file
chmod +X file
Multiple symbolic modes separated by commas may be given. Operations are performed in the order specified. The letter s is only useful
with u or g.
Only the owner of a file (or the super-user) may change its mode.
SEE ALSO ls(1), chmod(2), stat(2), umask(2), chown(8)7th Edition May 22, 1986 CHMOD(1)