12-31-2008
same file being opened by two users at a time
I want to avoid a situation where because two users simultaneously
open a file and modify and save, leaving the original file in mess.
Is there a way in UNIX to warn a user if that particular file is already being
used by another user.
Thanks in advance
10 More Discussions You Might Find Interesting
1. Programming
Hi All,
We can find the maximum of open file descriptors in hold with respect to a process.
As default size was 256 (with getrlimit) and the hard limt was 65536
I tried changing the limit to 1024(with setrlimit)
successfully changed the limit
but still I couldnt have as many open file... (3 Replies)
Discussion started by: matrixmadhan
3 Replies
2. UNIX for Dummies Questions & Answers
New to unix .. Is there a simple command or utility that will tell me when the last time a file was opened/used? (3 Replies)
Discussion started by: sbr262
3 Replies
3. Shell Programming and Scripting
Is there a way to tell for sure if a file currently is opened by any running process?
I have a task to filter a text file which is produced by some long process.
I have no way to communicate with that process, but I have access to a location, where that proces produce an output file.
Need... (3 Replies)
Discussion started by: alex_5161
3 Replies
4. Shell Programming and Scripting
Hello,
What i have to do is make a top 10 list of users sorted by the number of processes opened at a given time. Can anyone help me with finding out for a given moment, for all users how many processes each had opened? (5 Replies)
Discussion started by: gabibyte
5 Replies
5. Shell Programming and Scripting
Hello all,
I have a file that is growing and growing by the action of any process.
How can I find what process is?
Thank you (2 Replies)
Discussion started by: albertogarcia
2 Replies
6. Shell Programming and Scripting
Hi *,
I'm wondering if it possible to know WHO opened or modified a file last?
I know it's possible with some options of find and also ls to get when the file was modified last.
I'm currently supervising a file and have to log all users name who opened or modified it.
Thanx a lot for any... (3 Replies)
Discussion started by: Jabarod
3 Replies
7. Shell Programming and Scripting
I am writing a shell script (runs on HP Unix) which copies files from a source directory to another destination daily. The destination directory always have the files with same name as in the source directory. And daily a new file will be created in the source.
cp command works fine if the file... (1 Reply)
Discussion started by: arunkumar_ms
1 Replies
8. Shell Programming and Scripting
Hi
#Testing for file existence
if ; then
echo 'SCHOOL data is available for processing'
else
echo 'SCHOOL DATA IS NOT AVAILABLE FOR PROCESSING'
:
i wrote a script, where it begins by checking if file exists or not.
If it exists, it truncates the database... (2 Replies)
Discussion started by: rxg
2 Replies
9. Shell Programming and Scripting
HTML Code
archive_history() { HISTORYOLD=${HISTFILE}.archive CURTIME=`date` CURTTY=`tty` IP=$(echo $SSH_CLIENT | awk '{print $1}') if ; then echo "#-${HOSTNAME}-- ${CURBASHDATE} - ${CURTIME} ($CURTTY) ${USER} ${IP}----" >> $HISTORYOLD history... (2 Replies)
Discussion started by: rehantayyab82
2 Replies
10. Shell Programming and Scripting
HTML Code:
archive_history() { HISTORYOLD=${HISTFILE}.archive CURTIME=`date` CURTTY=`tty` IP=$(echo $SSH_CLIENT | awk '{print $1}') if ; then echo "#-${HOSTNAME}-- ${CURBASHDATE} - ${CURTIME} ($CURTTY) ${USER} ${IP}----" >> $HISTORYOLD history... (0 Replies)
Discussion started by: rehantayyab82
0 Replies
LEARN ABOUT SUSE
wpa_priv
WPA_PRIV(8) WPA_PRIV(8)
NAME
wpa_priv - wpa_supplicant privilege separation helper
SYNOPSIS
wpa_priv [ -c ctrl path ] [ -Bdd ] [ -P pid file ] [ driver:ifname [driver:ifname ...] ]
OVERVIEW
wpa_priv is a privilege separation helper that minimizes the size of wpa_supplicant code that needs to be run with root privileges.
If enabled, privileged operations are done in the wpa_priv process while leaving rest of the code (e.g., EAP authentication and WPA hand-
shakes) to operate in an unprivileged process (wpa_supplicant) that can be run as non-root user. Privilege separation restricts the effects
of potential software errors by containing the majority of the code in an unprivileged process to avoid the possibility of a full system
compromise.
wpa_priv needs to be run with network admin privileges (usually, root user). It opens a UNIX domain socket for each interface that is
included on the command line; any other interface will be off limits for wpa_supplicant in this kind of configuration. After this, wpa_sup-
plicant can be run as a non-root user (e.g., all standard users on a laptop or as a special non-privileged user account created just for
this purpose to limit access to user files even further).
EXAMPLE CONFIGURATION
The following steps are an example of how to configure wpa_priv to allow users in the wpapriv group to communicate with wpa_supplicant with
privilege separation:
Create user group (e.g., wpapriv) and assign users that should be able to use wpa_supplicant into that group.
Create /var/run/wpa_priv directory for UNIX domain sockets and control user access by setting it accessible only for the wpapriv group:
mkdir /var/run/wpa_priv
chown root:wpapriv /var/run/wpa_priv
chmod 0750 /var/run/wpa_priv
Start wpa_priv as root (e.g., from system startup scripts) with the enabled interfaces configured on the command line:
wpa_priv -B -c /var/run/wpa_priv -P /var/run/wpa_priv.pid wext:wlan0
Run wpa_supplicant as non-root with a user that is in the wpapriv group:
wpa_supplicant -i ath0 -c wpa_supplicant.conf
COMMAND ARGUMENTS
-c ctrl path
Specify the path to wpa_priv control directory (Default: /var/run/wpa_priv/).
-B Run as a daemon in the background.
-P file
Set the location of the PID file.
driver:ifname [driver:ifname ...]
The <driver> string dictates which of the supported wpa_supplicant driver backends is to be used. To get a list of supported driver
types see wpa_supplicant help (e.g, wpa_supplicant -h). The driver backend supported by most good drivers is wext.
The <ifname> string specifies which network interface is to be managed by wpa_supplicant (e.g., wlan0 or ath0).
wpa_priv does not use the network interface before wpa_supplicant is started, so it is fine to include network interfaces that are
not available at the time wpa_priv is started. wpa_priv can control multiple interfaces with one process, but it is also possible to
run multiple wpa_priv processes at the same time, if desired.
SEE ALSO
wpa_supplicant(8)
LEGAL
wpa_supplicant is copyright (c) 2003-2007, Jouni Malinen <j@w1.fi> and contributors. All Rights Reserved.
This program is dual-licensed under both the GPL version 2 and BSD license. Either license may be used at your option.
16 January 2010 WPA_PRIV(8)