07-16-2010
I do not know a version of chmod that allows a exclude list. So you you could create a list with the find command and remove with grep -v those you do not want and then feed that list in a while/read loop to chmod, for example.
10 More Discussions You Might Find Interesting
1. UNIX Desktop Questions & Answers
I just created a group. How do i make the groups read only to a specific file systems.(home directory). (3 Replies)
Discussion started by: niasdad
3 Replies
2. UNIX for Dummies Questions & Answers
I want to grant the 'write' right to one user so they can delete log files in a given directory. These are http log files, so a new one is created each day. The file owner is 'nobody'. If I use the command 'chmod a=rwx *' will this work for the new files created each day.
I've tried the... (7 Replies)
Discussion started by: Westy564
7 Replies
3. HP-UX
I wan to create a user e.g. Tom. whenever a file is created by user Tom or FTP is done using user as Tom, the rights on the file should be 777 (by default). how can I achieve this. Please help. Its very urgent. (1 Reply)
Discussion started by: sharmavr
1 Replies
4. UNIX for Advanced & Expert Users
Hi,
when I launch my perl script, I write on the shell:
perl x.pl
How I can can change the permission to write only:
x
to launch the program? (2 Replies)
Discussion started by: Minguccio75
2 Replies
5. UNIX for Advanced & Expert Users
The man page for chmod doesn't list a way to recursively change permissions on directories only, without affecting the files themselves.
Let's say that I wanted to change the permissions on the current directory and all subdirectories. I know I can write a bash script that would do this using... (1 Reply)
Discussion started by: retrovertigo
1 Replies
6. Shell Programming and Scripting
I want to make a hidden file with chmod command.
Example:
I have a file name inputfile.txt
-rw-r--r-- 1 xxxxxx xxxxxx 1388 Sep 12 05:41 inputfile.txt
I want to hide that file using chmod command.
Please tell me if it is possible or there is some other way to do this.
Thanks... (2 Replies)
Discussion started by: rinku
2 Replies
7. UNIX for Dummies Questions & Answers
Hi,
why can't I use the flag -R recursive ?
ftp> chmod -R a+xwr kickstart
usage: chmod mode remote-file
ftp> chmod a+xwr kickstart
200 SITE CHMOD command successful
thanks (2 Replies)
Discussion started by: aneuryzma
2 Replies
8. UNIX and Linux Applications
i think it is the same in both... Iam i right? (1 Reply)
Discussion started by: sumaiya
1 Replies
9. Shell Programming and Scripting
I have changed the premission of a file to 777. Now I would like to change permission to previously used ( UNDO ). Is there any command ?:confused: (3 Replies)
Discussion started by: frintocf
3 Replies
10. UNIX for Dummies Questions & Answers
I am looking for a small script to crawl through several directories and change a couple of files in each directory to read write status.
Anyone have any ideas ? (5 Replies)
Discussion started by: zapper222
5 Replies
LEARN ABOUT DEBIAN
explain_chmod_or_die
explain_chmod_or_die(3) Library Functions Manual explain_chmod_or_die(3)
NAME
explain_chmod_or_die - change permissions of a file and report errors
SYNOPSIS
#include <libexplain/chmod.h>
void explain_chmod_or_die(const char *pathname, int mode);
DESCRIPTION
The explain_chmod_or_die function is used to call the chmod(2) system call. On failure an explanation wiil be printed to stderr, obtained
from explain_chmod(3), and the the process terminates by calling exit(EXIT_FAILURE).
This function is intended to be used in a fashion similar to the following example:
explain_chmod_or_die(pathname, mode);
pathname
The pathname, exactly as to be passed to the chmod(2) system call.
mode The mode, exactly as to be passed to the chmod(2) system call.
Returns:
This function only returns on success. On failure, prints an explanation and exit(EXIT_FAILURE)s.
COPYRIGHT
libexplain version 0.52
Copyright (C) 2008 Peter Miller
AUTHOR
Written by Peter Miller <pmiller@opensource.org.au>
explain_chmod_or_die(3)