thanks LHammonds i've been doing this and with no reason i can't execute or even worst i can't create txt file with root user or a sudo comand like you said i get Code:
$ sudo ./list.sh
sudo: ./list.sh: command not found
so i think that there's no reason to create the .cmd and not the .txt file, i change the location of txt file to the home admin or anywhere else with user root or another user...
Code:
~$ sudo bash list.sh
bash: list.txt: Permission denied
Code:
root@mail:/home/administrador# bash list.sh
bash: list.txt: Permission denied
Code:
administrador@mail:~$ sudo bash list.sh
bash: list.txt: Permission denied
p.s. i create a folder for root
Code:
drwxr-xr-x 2 root root 4096 2011-10-19 13:57 temp
Code:
-rw-r--r-- 1 root root 600 2011-10-19 13:57 list.sh
and result:
Code:
root@mail:/home/administrador# bash list.sh
bash: /temp/list.txt: Permission denied
did i miss something? thanks