Try to do folowing
write shell script
#!/bin/sh
mount /dev/hdb /home/mountpoint
then write C code
int main(){
system ("mount.sh");
return 0;
}
then compile C code
gcc main.c -o wrapper
then chmod :
# chmod a+s wrapper
and do from php:
system ('wrapper');
Per Jessen пишет:
Mário Ga
Mário Gamito wrote:
> Hi,
>
> I'm trying to run /bin/mount and /sbin/mount.cifs from a PHP page.
>
> So, I´ve added this to /etc/sudoers:
>
> -
> Cmnd_AliasCMD_MOUNT = /bin/mount
> Cmnd_AliasCMD_CIFS ) = /sbin/mount
2 matches
Mail list logo