If directory entries are corrupt, ls may segfault.
You need run as root: dismount the filesystem and run fsck on it. .... probably could have given you a better answer if we knew what system you are on.
show the output of the commands:
Which of the filesystems from df -h has the bad directory?
Hi all,
I am very new to UNIX and Shell scripting, I need to run a script to check for file's and directoires permissions and change the permissions if necessary.
I appreciate your help..
Thanks (7 Replies)
Hi,
I was wondering if there is any way to find out when the file/directory's permissions were changed. Typically, when using 'chmod' to change a file/directory's permissions, the modification date does not change.
Any help would be greatly appreciated.
Thanks. (4 Replies)
I am running a linux centos server; our php script generates plenty of files in a directory, anything up to 1000 (though too often more).The files in these directories have permissions and ownerships which i need to change.
I have used shell comment for changing the file permission which is... (1 Reply)
Hi,
Is there any way to unzip a zip file and change file permissions to 777 while extracting the files. Does the file permissions on the zip file has to do anything with it(like zip read permissions only result in read uncompressed files etc.,)?
Thanks,
jp (2 Replies)
Hi everyone,
There are couple of users of which i need to give 2 of the users admin rights so that they are able to run the administration commands like "zoneadm" and locale.
When logged in as root i am obviously able to do that.please suggest any way by which the other 2 user's permissions can... (3 Replies)
Hi All,
I am trying to wite a Shell script which changes the permission of the files in a folder but stuck at a particular point,please help.
The scenario is as follwoing:
I am having a list of 10 files and a folder which has 100 files.
I need to copare the list and the folder ,for... (4 Replies)
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)
Is there any option with mv or cp command so that a file permissions and name of the file can be changed in single mv or cp command. I searched man mv but doesn't found any option like that. (3 Replies)
Hi All,
Apologies if this question has been asked before. I havent been able to resolve an issue and would like some help.
I am getting files pushed to me via sftp. The files once pushed to my server in folder ABC have -rw------- but I need these files to have the following -rw-rw---- to be... (1 Reply)
Discussion started by: israr75
1 Replies
LEARN ABOUT MINIX
chmod
CHMOD(1) General Commands Manual CHMOD(1)NAME
chmod - change access mode for files
SYNOPSIS
chmod [-R] mode file ...
OPTIONS -R Change hierarchies recursively
EXAMPLES
chmod 755 file # Owner: rwx Group: r-x Others: r-x
chmod +x file1 file2
# Make file1 and file2 executable
chmod a-w file # Make file read only
chmod u+s file # Turn on SETUID for file
chmod -R o+w dir # Allow writing for all files in dir
DESCRIPTION
The given mode is applied to each file in the file list. If the -R flag is present, the files in a directory will be changed as well. The
mode can be either absolute or symbolic. Absolute modes are given as an octal number that represents the new file mode. The mode bits are
defined as follows:
4000 Set effective user id on execution to file's owner id
2000 Set effective group id on execution to file's group id
0400 file is readable by the owner of the file
0200 writeable by owner
0100 executable by owner
0070 same as above, for other users in the same group
0007 same as above, for all other users
Symbolic modes modify the current file mode in a specified way. The form is:
[who] op permissions { op permissions ...} {, [who] op ... }
The possibilities for who are u, g, o, and a, standing for user, group, other and all, respectively. If who is omitted, a is assumed, but
the current umask is used. The op can be +, -, or =; + turns on the given permissions, - turns them off; = sets the permissions exclu-
sively for the given who. For example g=x sets the group permissions to --x.
The possible permissions are r, w, x; which stand for read, write, and execute; s turns on the set effective user/group id bits. s only
makes sense with u and g; o+s is harmless.
SEE ALSO ls(1), chmod(2).
CHMOD(1)