This is best email from long time where OP has written full query,
everybody must follow such style.
comments inline

On Sun, Apr 10, 2011 at 12:22 PM, etika ahuja <[email protected]> wrote:
> these are  the details of etika.sh
> -rw-rw-r--. 1 etika etika 83 2011-04-10 12:05 etika.sh
>
> contents of etika.sh
> chown abc:abc /home/etika/Desktop/etika.txt
> ls -l /home/etika/Desktop/etika.txt
>
>   details of etika.txt file
> -rwxrwxrwx. 1 etika etika 83 2011-04-10 12:04 etika.txt
>
> i have made etika as sudoers
>
> now i ran my script
> etika@etika Desktop]$ sh etika.sh
> chown: changing ownership of `/home/etika/Desktop/etika.txt': Operation not
> permitted
> -rwxrwxrwx. 1 etika etika 83 2011-04-10 12:04 /home/etika/Desktop/etika.txt
>
> i wanted this to happen where abc is also a user on my system
> -rwxrwxrwx. 1 abc abc 83 2011-04-10 12:04 /home/etika/Desktop/etika.txt
>
> why its saying operation not permitted i have made etika as a sudoer then
> why still it is showing problem

Etika is Sudo User but you are not doing sudo operations,
Two way to solve your problem
  ========== Fist way =========
contents of etika.sh
sudo chown abc:abc /home/etika/Desktop/etika.txt

If you add sudo in command then it will run as root user,
  ========== second  way =========
you can execute using sudo command
sudo bash etika.sh

-- 
LUG@IITD - http://lug-iitd.org/Footer

Reply via email to