10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello
I have a file containing the list of different folders like this file_list.txt:
/s8/tests/test1
/s8/tests/tests/test2
/s8/tests/test2
/s8/tests/tests/test2/test5
I want a script to put the owner user of each folder in front of it in the text file.
So the reult would become... (5 Replies)
Discussion started by: Johanni
5 Replies
2. Shell Programming and Scripting
Currently i have following syntax:
ldapsearch -D "CN=..,OU=..,OU=All Businesses,DC=..,DC=..,DC=.." -w .. -h .. -p .. -b "OU=All Businesses,DC=..,DC=..,DC=.." "managedObjects=$DL_NAME_CN" employeeNumber givenName sn -S employeeNumber -x
which gives me following info:
"requesting:... (0 Replies)
Discussion started by: arsenghani
0 Replies
3. UNIX for Dummies Questions & Answers
Hi I need help. I need to use find (or grep I don't care) to recursively search for files who have any kind of executable permissions (group and/or owner and/or other). I am looking for *.c and *.h
This what I am using now:
find . -name *.h -perm -111 -print
but I don't want to retype that... (4 Replies)
Discussion started by: dissectcode
4 Replies
4. UNIX for Advanced & Expert Users
Hi,
Im working with an Informix db, i would like to know the command to identify the owner of a particular database
Thanks (2 Replies)
Discussion started by: dvah
2 Replies
5. UNIX for Advanced & Expert Users
Hi all,
We have some files are under 744 permissions and the the owner is say owner1 and group1.
Now we have another user owner2 of group2, owner2 can remove files of the owner1 and the permission of those files are 744, unix admin told us he did some config at his side so we can do that.
... (14 Replies)
Discussion started by: TheGunMan
14 Replies
6. Shell Programming and Scripting
hi all,
i need to capture all the files in a directory and its subdirectories that have owner name different than the root owner.
for one file it is " stat -c %U filename " but i need to search for each and every file and record it.
thanks in advance (14 Replies)
Discussion started by: vyasa
14 Replies
7. UNIX for Dummies Questions & Answers
How to know owner of a file without ls and find command :p (1 Reply)
Discussion started by: swat
1 Replies
8. UNIX for Dummies Questions & Answers
Hello,
I have a problem, I need to find files in folder by owner, not using find command at all and ls -R parameter. Thanx a lot.
Best regarts (1 Reply)
Discussion started by: Boliakas
1 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I need a command to find a files under particular owner ?All the files in the system for the particular user id is the owner?
Please help me on this? (2 Replies)
Discussion started by: jayaramanit
2 Replies
10. Shell Programming and Scripting
hi
how can I extract the owner of the file from the find command that I used below
find /home -type f -atime +5
I tried something like this but didnt work.
find /home -type f -atime +5 -ls |cut -f5 (5 Replies)
Discussion started by: tjay83
5 Replies
pure-uploadscript(8) Pure-FTPd pure-uploadscript(8)
NAME
pure-uploadscript - Automatically run an external program after a successful upload
SYNTAX
pure-uploadscript [-p </path/to/pidfile>] [-B] [-g <gid>] [-h] -r <program to run> [-u <uid>]
DESCRIPTION
If Pure-FTPd is compiled with --with-uploadscript (default in binary distributions), and if the -o (or --uploadscript) is passed to the
server, a named pipe called /var/run/pure-ftpd.upload.pipe is created. You will also notice an important file called
/var/run/pure-ftpd.upload.lock, used for locking.
After a successful upload, the file name is written to the pipe.
pure-uploadscript reads this pipe to automatically run any program or script to process the newly uploaded file.
OPTIONS
-B Daemonize the process and fork it in background.
-g <gid>
Switch the group ID to <gid>.
-h or --help
Display available options.
-r <program to run>
Tell what program/script to run. It has to be an absolute filename, the PATH environment variable is ignored. The first argument of
that program will be the unquoted name of the newly uploaded file. Environment variables aren't cleared. So don't put sensitive
data in them before calling pure-uploadscript if you switch uid.
-u <uid>
Switch the user ID to <uid>.
ENVIRONMENT
When the upload script is run, the name of the newly uploaded file is the first argument passed to the script (referenced as $1 by most
shells) . Some environment variables are also filled by useful info about the file. UPLOAD_SIZE The size of the file, in bytes.
UPLOAD_PERMS The permissions, as an octal integer. UPLOAD_UID The numerical UID of the owner. UPLOAD_GID The numerical GID of the owner.
UPLOAD_USER The login of the owner. UPLOAD_GROUP The group name the files belongs to. UPLOAD_VUSER The full user name, or the virtual
user name (127 chars max) .
FILES
/var/run/pure-ftpd.upload.pipe /var/run/pure-ftpd.upload.lock /var/run/pure-uploadscript.pid
SECURITY
pure-ftpd and pure-uploadscript are trying to limit security implications of such a feature.
- The pipe can only be created and opened by root. It must have perms 600, with uid 0, or it will be ignored.
- The argument passed to an external program/script is always an exact absolute path name. It doesn't get fooled by chroot()ed environ-
ments, and by absolute or relative paths added to the STOR command.
- UID and GID are set just after parsing command-line options, and pure-uploadscript never gets back supervisor privileges.
- Descriptors to the pipe are never passed to external programs/scripts. So when UID switched, the target user can't mess the pipe.
- Only regular files are processed, control characters are rejected, and a header+footer avoid partial file names.
- Two external programs/scripts can't run at the same time. Uploads are always processed sequentially, in chronological order. This is to
avoid denial-of-services by issuing a lot of simultaneous STOR commands in order to launch a fork bomb on the server. For this reason, your
programs shouldn't take a long time to complete (but they can run themselves in background) .
EXAMPLES
A sample script could be :
#! /bin/sh
echo "$1 uploaded" | /usr/bin/mutt -s "New upload : $1" ftpadmin@dom.ai.n
Never forget to quote ("variable") all variables in all your shell scripts to avoid security flaws.
AUTHORS
Frank DENIS <j at pureftpd dot org>
SEE ALSO
ftp(1), pure-ftpd(8) pure-ftpwho(8) pure-mrtginfo(8) pure-uploadscript(8) pure-statsdecode(8) pure-pw(8) pure-quotacheck(8) pure-authd(8)
RFC 959, RFC 2228, RFC 2389 and RFC 2428.
Pure-FTPd team 1.0.36 pure-uploadscript(8)