Problem in making a script

Amrit Pal Pathak amritpalpathak1 at gmail.com
Sat Jul 2 15:24:21 UTC 2011


On Sat, Jul 2, 2011 at 11:12 AM, Nils Kassube <kassube at gmx.net> wrote:

> Amrit Pal Pathak wrote:
> > On Sat, Jul 2, 2011 at 7:21 AM, Nils Kassube <kassube at gmx.net> wrote:
> > > > sudo wget http://202.164.53.116/~amritpal/edit/kannel.conf
> > > > sudo chmod a+w kannel.conf
> > >
> > > While these lines have nothing to do with your original question,
> > > I'll comment on them anyway. These lines are a bit strange because
> > > first you use sudo to wget a file, and then you change the
> > > permissions to make the file world writeable. If you don't use
> > > sudo for the wget command, you don't need to change the
> > > permissions afterwards.
> >
> >       I think you said reverse.Your meaning might "if you use sudo
> > for wget a file ,there is no need to change the permissions".
>
> No, if you use "sudo wget ...", the file is owned by root and writeable
> only by root. Therefore you used "sudo chmod ..." to make it writeable
> by the user. However if you use wget without sudo in the first place,
> the file is already owned and writeable by the user and no chmod is
> needed. Therefore I would suggest to replace the two commands above with
> this single command:
>
> wget http://202.164.53.116/~amritpal/edit/kannel.conf
>
>
>  ok got your idea.
>
      Thanks

   amritpalpathakgne.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20110702/a4f0421e/attachment.html>


More information about the ubuntu-users mailing list