Sponsored Content
Top Forums Shell Programming and Scripting ksh; Change file permissions, update file, change permissions back? Post 302560593 by ieth0 on Friday 30th of September 2011 08:59:55 AM
Old 09-30-2011
index all files permissions in a file , then change permission and modify the files as you wish, then use the indexed file to change permissions back.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

checking file's permissions and change them

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)
Discussion started by: K-ONE
7 Replies

2. Solaris

File Permissions change date

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)
Discussion started by: kpatel
4 Replies

3. UNIX for Advanced & Expert Users

How to change the permissions of ksh?

Suppose, I want to execute unix commands. For that I have to go to ksh, but if I don't have execute permission to ksh itself then is there any way to change the permission of ksh? chmod command does not work for this because, I don't have permission to ksh itself... :) Let me know, if you have... (3 Replies)
Discussion started by: ponnuvel
3 Replies

4. Shell Programming and Scripting

We need to change the file permissions and ownerships?

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)
Discussion started by: nilson
1 Replies

5. UNIX for Dummies Questions & Answers

unzip and change file permissions

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)
Discussion started by: jpk
2 Replies

6. UNIX for Advanced & Expert Users

script to recursively change permissions on file and dirs differently?

Hi there, I need to change all files/dirs 1. all files with 744 2. all dirs with 755 is there a script for that ? thanks, thegunman (13 Replies)
Discussion started by: TheGunMan
13 Replies

7. Shell Programming and Scripting

How can we change the permissions of a file in a directory

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)
Discussion started by: Sriram.Vedula53
4 Replies

8. UNIX for Dummies Questions & Answers

I am not able change the file permissions

while trying to view the access permissions to file by "ls -lrt" command it is opening some files int the dir after that segmentation fault ie core is generarting the dir.will anybody please what is the problem. (1 Reply)
Discussion started by: rajkumar_g
1 Replies

9. Windows & DOS: Issues & Discussions

script to change widows update permissions

I want to allow windows update when ordinary users are logged on, I'm pretty sure that adjusting the permissions registry entry HEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/WindowsUpdate to allow acces to all domins users does the trick. I already have a logon.bat that runs at... (0 Replies)
Discussion started by: barrydocks
0 Replies

10. UNIX for Beginners Questions & Answers

Sftp change file permissions

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
nischmod(1)							   User Commands						       nischmod(1)

NAME
nischmod - change access rights on a NIS+ object SYNOPSIS
nischmod [-AfLP] mode name... DESCRIPTION
nischmod changes the access rights (mode) of the NIS+ objects or entries specified by name to mode. Entries are specified using indexed names (see nismatch(1)). Only principals with modify access to an object may change its mode. mode has the following form: rights [, rights]... rights has the form: [ who ] op permission [ op permission ]... who is a combination of: n Nobody's permissions. o Owner's permissions. g Group's permissions. w World's permissions. a All, or owg. If who is omitted, the default is a. op is one of: + To grant the permission. - To revoke the permission. = To set the permissions explicitly. permission is any combination of: r Read. m Modify. c Create. d Destroy. Unlike the system chmod(1) command, this command does not accept an octal notation. OPTIONS
The following options are supported: -A Modify all entries in all tables in the concatenation path that match the search criteria specified in name. This option implies the -P switch. -f Force the operation and fail silently if it does not succeed. -L Follow links and change the permission of the linked object or entries rather than the permission of the link itself. -P Follow the concatenation path within a named table. This option is only applicable when either name is an indexed name or the -L switch is also specified and the named object is a link pointing to an entry. EXAMPLES
Example 1: Using the nischmod Command This example gives everyone read access to an object. (that is, access for owner, group, and all). example% nischmod a+r object This example denies create and modify privileges to group and unauthenticated clients (nobody). example% nischmod gn-cm object In this example, a complex set of permissions are set for an object. example% nischmod o=rmcd,g=rm,w=rc,n=r object This example sets the permissions of an entry in the password table so that the group owner can modify them. example% nischmod g+m '[uid=55],passwd.org_dir' The next example changes the permissions of a linked object. example% nischmod -L w+mr linkname ENVIRONMENT VARIABLES
NIS_PATH If this variable is set, and the NIS+ name is not fully qualified, each directory specified will be searched until the object is found (see nisdefaults(1)). EXIT STATUS
The following exit values are returned: 0 Successful operation. 1 Operation failed. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWnisu | +-----------------------------+-----------------------------+ SEE ALSO
chmod(1), nis+(1), nischgrp(1), nischown(1), nisdefaults(1), nismatch(1), nis_objects(3NSL), attributes(5) NOTES
NIS+ might not be supported in future releases of the SolarisTM Operating Environment. Tools to aid the migration from NIS+ to LDAP are available in the Solaris 9 operating environment. For more information, visit http://www.sun.com/directory/nisplus/transition.html. SunOS 5.10 10 Dec 2001 nischmod(1)
All times are GMT -4. The time now is 05:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy