hello
I search a script (ksh for Aix 5.3) to save all permissions, groups and owner for all files. Because we work much to change it, and a mystake ......!
So i want execute this script to save/ execute permissions for all files.
If you have this script, thank you for your help ;)
best... (2 Replies)
all the files and directories in my system are owned by root only.i try to(from root loggin) change the permission on the file but not permitted.can any one help to fix my problem .also while installing any software always error occur like no makefile available (1 Reply)
sm860 IS the owner of the files below,but yet sm860 cannot change the ownership to bpt3a1.Please let me know why ?
See below for details
---
sm860@unixs741_DEV:/usr/gdp/home/ftp/bpt3a1/incoming/ahdb/T5/pcasav/daily $ ls -l pcasav*
-rw-r--r-- 1 sm860 gdpintegrators 821 Sep 21 16:15... (8 Replies)
Hi,
I am using redhat AS 3. Recently, I was asked to implement a security control on the OS: to change ownership of /var/log/wtmp to root:sys and permission to 600. However, when I made the change and reboot the machine, everything was reverted. How come? Please help.
The following is the... (1 Reply)
Folks;
I'd like to create a group on my Linux box & add a few users to it.
Is there a way to do so and restrict this group/users to have access to only one or directory trees?
Let's say i need this group to only have a read write access to only these two directories /opt/Virtu & /fsn/comers
... (10 Replies)
I need to find all the files that have group Read or Write permission or files that have user write permission.
This is what I have so far:
find . -exec ls -l {} \; | awk '/-...rw..w./ {print $1 " " $3 " " $4 " " $9}'
It shows me all files where group read = true, group write = true... (5 Replies)
i am able to change the mode using chmod and able to change permission.
but i am not able to change group and ownership. getting as invalid
can any one help me regarding this . (4 Replies)
HI All,
I am using solaris
i created a user adam and updated his permissions
in vi sudoers file as follows
adam ALL=(ALL) NOPASSWORD: ALL
...........
when i create user by logging as sudo user .
$ sudo useradd -d /home/kalyan -m -s /bin/sh kalyan
sudo: not found
... (6 Replies)
I try to use setfacl command to change the permission of the group primary it does not accept the command , it really accept but don't change the permission on the group. the point here I read that if I use chmod command on group primary the mask changed, but if I use setfacl mask should not... (0 Replies)
I have a script that do read data for Munin Graph.
My problem is that it have some reading problems, and I do not know how to fix it.
script traf.sh (its not the complete script)#!/bin/sh
PORT="80"
NETDEVICE="eth0"
IPTRAFlogdir="/var/log/iptraf"
... (8 Replies)
Discussion started by: Jotne
8 Replies
LEARN ABOUT LINUX
flock
FLOCK(1) H. Peter Anvin FLOCK(1)NAME
flock - Manage locks from shell scripts
SYNOPSIS
flock [-sxon] [-w timeout] lockfile [-c] command...
flock [-sxon] [-w timeout] lockdir [-c] command...
flock [-sxun] [-w timeout] fd
DESCRIPTION
This utility manages flock(2) locks from within shell scripts or the command line.
The first and second forms wraps the lock around the executing a command, in a manner similar to su(1) or newgrp(1). It locks a specified
file or directory, which is created (assuming appropriate permissions), if it does not already exist.
The third form is convenient inside shell scripts, and is usually used the following manner:
(
flock -n 9
# ... commands executed under lock ...
) 9>/var/lock/mylockfile
The mode used to open the file doesn't matter to flock; using > or >> allows the lockfile to be created if it does not already exist, how-
ever, write permission is required; using < requires that the file already exists but only read permission is required.
By default, if the lock cannot be immediately acquired, flock waits until the lock is available.
OPTIONS -s, --shared
Obtain a shared lock, sometimes called a read lock.
-x, -e, --exclusive
Obtain an exclusive lock, sometimes called a write lock. This is the default.
-u, --unlock
Drop a lock. This is usually not required, since a lock is automatically dropped when the file is closed. However, it may be
required in special cases, for example if the enclosed command group may have forked a background process which should not be hold-
ing the lock.
-n, --nb, --nonblock
Fail (with an exit code of 1) rather than wait if the lock cannot be immediately acquired.
-w, --wait, --timeout seconds
Fail (with an exit code of 1) if the lock cannot be acquired within seconds seconds. Decimal fractional values are allowed.
-o, --close
Close the file descriptor on which the lock is held before executing command. This is useful if command spawns a child process
which should not be holding the lock.
-c, --command command
Pass a single command to the shell with -c.
-h, --help
Print a help message.
AUTHOR
Written by H. Peter Anvin <hpa@zytor.com>.
COPYRIGHT
Copyright (C) 2003-2006 H. Peter Anvin.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
SEE ALSO flock(2)AVAILABILITY
The flock command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
flock utility 4 Feb 2006 FLOCK(1)