Sponsored Content
Top Forums Shell Programming and Scripting Script to echo "File permissions or ownership changed from required " when accidentally changed. Post 302799245 by shiek.kaleem on Friday 26th of April 2013 05:09:58 AM
Old 04-26-2013
Question Script to echo "File permissions or ownership changed from required " when accidentally changed.

Hi All,

I have to work in the late nights some times for server maintenance and in a hurry to complete I am accidentally changing ownership or permission of directories Smilie
which have similar names ( /var in root and var of some other directory ).Smilie

Can some one suggest me with the logic or already available script by which the change in ownership or permission of a directory can be tracked from previous state..Smilie
 

10 More Discussions You Might Find Interesting

1. Solaris

changed shell of the root accidentally

Hi All, I have changed the shell of the root accidentally to /sbin/bash :mad: How do I change that? :( To change that I need to go to ok prompt I think, and there I need to mount the root file system in order to make changes to the respective file. Can any one please suggest how do I do... (4 Replies)
Discussion started by: pintu_asim
4 Replies

2. HP-UX

How I know "last password changed".

Hi all, My HP-UX server 11.11 trusted system. How I know when password was last changed. Thanks , arm_naja (4 Replies)
Discussion started by: arm_naja
4 Replies

3. 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

4. Solaris

file permissions changed to nobody4

Hi there We have had a weird problem arise recently whereby a file owned by cjo:cjogroup suddenly had it's permissions changed to nobody4:nogroup. The file is mounted off a NetApp Filer volume with the NFS permissions set to Read-Write Access (All Hosts) but no Root Access. When we tried to... (1 Reply)
Discussion started by: skewbie
1 Replies

5. Shell Programming and Scripting

"sed" to check file size & echo " " to destination file

Hi, I've modified the syslogd source to include a thread that will keep track of a timer(or a timer thread). My intention is to check the file size of /var/log/messages in every one minute & if the size is more than 128KB, do a echo " " > /var/log/messages, so that the file size will be set... (7 Replies)
Discussion started by: jockey007
7 Replies

6. OS X (Apple)

I accidentally changed to only write permission on /usr/bin... please Help!

I accidentally changed to sudo chmod a=w to my /usr/bin folder on my macbook with OS 10.5.8... Please help! I can't even get into a terminal correctly cause it displays: -bash: uname: command not found -bash: cut: command not found -bash: uname: command not found -bash: cut: command not found... (6 Replies)
Discussion started by: scaryMac23
6 Replies

7. Emergency UNIX and Linux Support

Mapping between "Pseudo name" and "Logical device ID" in powerpath with SVM changed....

Dear All, I was having powerpath 5.2 on SUN server with SVM connected to CLARIION box.Please find the following output : root # powermt display dev=all Pseudo name=emcpower3a CLARiiON ID=CK200073400372 Logical device ID=60060160685D1E004DD97FB647BFDC11 state=alive; policy=CLAROpt;... (1 Reply)
Discussion started by: Reboot
1 Replies

8. Emergency UNIX and Linux Support

Accidentally Changed File Ownership to Include a "Comment" [AIX]

Hi. I've had a little mishap. To cut a long story short, I've accidentally recursively ran chown on a directory (actually a bunch of 'em). Not a problem in itself, but I had a slight error in the code I used to get the list of directories and ended up with a comment in the file ownership. ... (15 Replies)
Discussion started by: Scott
15 Replies

9. Red Hat

Accidentally changed ownership-unable to SSH into server.

Hi All, Accidentally changed ownership of /var directory as root :eek: thinking that I am changing ownership of var directory in other location in the file system:D.Now unable to SSH into the server:(. By gods grace I was able to regain the access again as server was in control of me at that... (5 Replies)
Discussion started by: shiek.kaleem
5 Replies

10. OS X (Apple)

Command Prompt changed to "mrbigglesworth" ?!?!

I recently installed mySQL on my macbook. I opened Terminal to run mySQL and entered "cd /usr/local/mysql/bin". My command prompt immediately changed to "mrbigglesworth:". I have no idea why that happened. When I look for the .bash_profile file, it doesn't seem to exist. I opened the... (3 Replies)
Discussion started by: mmesford
3 Replies
delete directory(1m)													      delete directory(1m)

NAME
delete directory - Deletes a directory SYNOPSIS
cdscp delete directory directory-name ARGUMENTS
The full name of the directory. DESCRIPTION
The delete directory command deletes a directory. The directory cannot contain any object entries, soft links, or child pointers. The master replica must be the only remaining replica in the cell. Use the delete replica command if you need to remove read-only replicas. Privilege Required You must have delete permission to the directory and write permission to the clearinghouse that stores the master replica of the directory. The server principal needs administer permission to the parent directory or delete permission to the child pointer that points to the directory you intend to delete. NOTE
This command is replaced at Revision 1.1 by the dcecp command and may not be provided in future releases of DCE. EXAMPLE
The following command deletes the directory /.:/eng from the namespace: cdscp> delete directory /.:/eng RELATED INFORMATION
Commands: create directory(1m), delete replica(1m), list directory(1m), set directory(1m), set directory to skulk(1m), show directory(1m) delete directory(1m)
All times are GMT -4. The time now is 10:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy