[sudo-users] problem with allowing mv

Charles Williams chuck at itadmins.net
Thu Mar 22 10:56:59 EDT 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hey all,

I have a directory where a bunch of xml files are getting saved and need
to allow www-data to move those files to another location for
processing. My current sudoers has an entry as follows:

www-data ALL = (root) NOPASSWD: /bin/mv /home/m/madsack.de/pkraut/haz/*
*, /bin/chown www-data.
/var/www/dev/m/mol/haz24.bluedotmedia.de/html/xml/new/*

The problem is that the command that needs to be executed in the script is:

sudo /bin/mv /home/m/madsack.de/pkraut/haz/*.xml .

and I cat the "cannot stat ... no such file or directory" error when
attempting it.

any ideas?


here is my sudo info:

root at dev:/var/www/dev/m/mol/haz24.bluedotmedia.de/html/xml/new# sudo -V
Sudo version 1.7.4p4

Configure args: --prefix=/usr -v --with-all-insults --with-devel
- --with-pam --with-fqdn --with-logging=syslog --with-logfac=authpriv
- --with-env-editor --with-editor=/usr/bin/editor --with-timeout=15
- --with-password-timeout=0 --with-passprompt=[sudo] password for %p:
- --with-timedir=/var/lib/sudo --disable-root-mailer --disable-setresuid
- --with-sendmail=/usr/sbin/sendmail --mandir=/usr/share/man
- --libexecdir=/usr/lib/sudo
-
--with-secure-path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin
Sudoers path: /etc/sudoers
Authentication methods: 'pam'
Syslog facility if syslog is being used for logging: authpriv
Syslog priority to use when user authenticates successfully: notice
Syslog priority to use when user authenticates unsuccessfully: alert
Send mail if the user is not in sudoers
Use a separate timestamp for each user/tty combo
Lecture user the first time they run sudo
Require users to authenticate by default
Root may run sudo
Allow some information gathering to give useful error messages
Require fully-qualified hostnames in the sudoers file
Visudo will honor the EDITOR environment variable
Set the LOGNAME and USER environment variables
Length at which to wrap log file lines (0 for no wrap): 80
Authentication timestamp timeout: 15,0 minutes
Password prompt timeout: 0,0 minutes
Number of tries to enter a password: 3
Umask to use or 0777 to use user's: 022
Path to mail program: /usr/sbin/sendmail
Flags for mail program: -t
Address to send mail to: root
Subject line for mail messages: *** SECURITY information for %h ***
Incorrect password message: Sorry, try again.
Path to authentication timestamp dir: /var/lib/sudo
Default password prompt: [sudo] password for %p:
Default user to run commands as: root
Value to override user's $PATH with:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin
Path to the editor for use by visudo: /usr/bin/editor
When to require a password for 'list' pseudocommand: any
When to require a password for 'verify' pseudocommand: all
File containing dummy exec functions: /usr/lib/sudo/sudo_noexec.so
File descriptors >= 3 will be closed before executing a command
Reset the environment to a default set of variables
Environment variables to check for sanity:
	TERM
	LINGUAS
	LC_*
	LANGUAGE
	LANG
	COLORTERM
Environment variables to remove:
	RUBYOPT
	RUBYLIB
	PYTHONUSERBASE
	PYTHONINSPECT
	PYTHONPATH
	PYTHONHOME
	TMPPREFIX
	ZDOTDIR
	READNULLCMD
	NULLCMD
	FPATH
	PERL5DB
	PERL5OPT
	PERL5LIB
	PERLLIB
	PERLIO_DEBUG
	JAVA_TOOL_OPTIONS
	SHELLOPTS
	GLOBIGNORE
	PS4
	BASH_ENV
	ENV
	TERMCAP
	TERMPATH
	TERMINFO_DIRS
	TERMINFO
	_RLD*
	LD_*
	PATH_LOCALE
	NLSPATH
	HOSTALIASES
	RES_OPTIONS
	LOCALDOMAIN
	PS4
	SHELLOPTS
	CDPATH
	IFS
Environment variables to preserve:
	XAUTHORIZATION
	XAUTHORITY
	TZ
	PS2
	PS1
	PATH
	LS_COLORS
	KRB5CCNAME
	HOSTNAME
	DISPLAY
	COLORS
Locale to use while parsing sudoers: C
Local IP address and netmask pairs:
	127.0.0.2 / 255.255.255.255
	10.1.1.11 / 255.255.255.255
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9rPbsACgkQIUUjp07y+ZYPVwCbBN1Z/YDEnUnrHkY9CAclorcJ
mdYAn1YYJ+hkC7F+VVdVeDpzJY1wmrlh
=SEk9
-----END PGP SIGNATURE-----



More information about the sudo-users mailing list