![]() |
|
|||
![]()
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_ -/]* Code:
sudo /usr/sbin/chown ftp:ftp /exports/nasbezoom/volume6 Code:
sudo /usr/sbin/chown ftp:ftp /exports/nasbezoom/volume6/../blablabla Thnx |
|
|||
![]()
Wrong? You just underestimate the significance of the "*" wildcard
![]() From the sudoers manpage Code:
Wildcards sudo allows shell-style wildcards (aka meta or glob characters) to be used in pathnames as well as command line arguments in the sudoers file. Wildcard matching is done via the POSIX fnmatch(3) routine. Note that these are not regular expressions. * Matches any set of zero or more characters.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
![]()
Is see, i tought the * was about the preceding expression...
Can it be done with sudo? Thanks, Jan |
![]() |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Installing sudo | rex | FreeBSD General | 4 | 24th October 2008 12:40 AM |