Thread: SUDO Wildcards
View Single Post
  #1   (View Single Post)  
Old 6th June 2008
jcatrysse jcatrysse is offline
New User
 
Join Date: Jun 2008
Posts: 2
Default SUDO Wildcards

Hello,

I have a php script that creates directories as ftp:ftp

Best thing I can think of is doing a simple php mkdir and then a sudo with chown and a specific parameters definition.

In my sudoers I have added:
Code:
www ALL= NOPASSWD: /usr/sbin/chown ftp\:ftp /exports/nasbezoom/volume[a-z0-9_ -/]*
This seems to work for:
Code:
sudo /usr/sbin/chown ftp:ftp /exports/nasbezoom/volume6
but also for:
Code:
sudo /usr/sbin/chown ftp:ftp /exports/nasbezoom/volume6/../blablabla
Am I doing something wrong with my wildcards?

Thnx
Reply With Quote