Re: USB Drive weirdness

Steve Holdoway <[email protected]>
Newsgroups gmane.org.user-groups.linux.new-zealand.general
Organization Green Gecko Global Ltd.
Message-ID <1318377994.15780.25.camel@steve-desktop>
On Wed, 2011-10-12 at 12:30 +1300, Bruce Kingsbury wrote:
> On 12 October 2011 11:24, Jaco <[email protected]> wrote:
> 
> > >open a terminal and 'sudo chmod a+rwx -R /media/whatever' to make the root
> > directory and anything you already put into it writable by everyone
> >
> > Seems ridiculously dangerous to me, but I'll bite.....
> > I would've used some variant of `find /media/whatever -type f -exec chmod
> > a+rw {} \;` or some variant of `chown $(whoami)`,  rather than enabling
> > execution on arbitrary files.
> > The aforementioned command would work, but seems a bit drastic: like using
> > a sledge-hammer to drive in a thumb-tack.
> 
> 
> Valid point. If it's a new filesystem you can drop the -R because there
> won't be anything to change permissions on other than the root directory. If
> it's an existing filesystem it would probably be safer to chown all the
> files, or use find to set a+rw on the files, and only set a+rwx on the
> directories ..

Have a look a the chown docs... specifically the X flag.

Cheers,

Steve
-- 
Steve Holdoway BSc(Hons) MNZCS <[email protected]>
http://www.greengecko.co.nz
MSN: [email protected]
Skype: sholdowa

_______________________________________________
NZLUG mailing list [email protected]
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.