Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.development.apps > #466
| From | Grant Edwards <invalid@invalid.invalid> |
|---|---|
| Newsgroups | comp.os.linux.development.apps |
| Subject | Re: fopen() of a read-only file for writing? |
| Date | 2012-04-19 14:16 +0000 |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Message-ID | <jmp6o7$5t6$1@reader1.panix.com> (permalink) |
| References | <s5KdnY85luiJChHSnZ2dnUVZ_uGdnZ2d@earthlink.com> <jmiu3v$is7$1@speranza.aioe.org> <LaydnQXV_ti8FBLSnZ2dnUVZ_qmdnZ2d@earthlink.com> |
On 2012-04-19, Joe Shead <Joe@SheadProgramming.com> wrote:
> I tested it, and it works. With a new non-root user, I got the EACCES that I
> expected.
>
> I'll just say, for anyone out there who wants to read my humble opinion,
> that sometimes root wants to set things (like relatively stable C++ code, or
> an initialization script) to read-only, so he knows that if he opens those
> files to take a look,
Don't do stuff like that (browsing around looking at source code) as
root.
> he can't easily accidentally modify them. If he wants to change the
> file, he would actually like to be forced to do a chmod, make the
> deliberate changes, and then chmod it back to read-only. I do that
> all the time.
Don't log in as root.
Browse around as a normal user and then use sudo when you decide you
want to change something that requires root privleges.
--
Grant Edwards grant.b.edwards Yow! You should all JUMP
at UP AND DOWN for TWO HOURS
gmail.com while I decide on a NEW
CAREER!!
Back to comp.os.linux.development.apps | Previous | Next — Previous in thread | Next in thread | Find similar
fopen() of a read-only file for writing? "Joe Shead" <Joe@SheadProgramming.com> - 2012-04-16 17:03 -0600
Re: fopen() of a read-only file for writing? pacman@kosh.dhis.org (Alan Curry) - 2012-04-17 05:12 +0000
Re: fopen() of a read-only file for writing? "Joe Shead" <Joe@SheadProgramming.com> - 2012-04-17 01:36 -0600
Re: fopen() of a read-only file for writing? "Joe Shead" <Joe@SheadProgramming.com> - 2012-04-18 22:40 -0600
Re: fopen() of a read-only file for writing? Richard Kettlewell <rjk@greenend.org.uk> - 2012-04-19 08:57 +0100
Re: fopen() of a read-only file for writing? Rainer Weikusat <rweikusat@mssgmbh.com> - 2012-04-19 14:18 +0100
Re: fopen() of a read-only file for writing? Grant Edwards <invalid@invalid.invalid> - 2012-04-19 14:16 +0000
Re: fopen() of a read-only file for writing? "Joe Shead" <Joe@SheadProgramming.com> - 2012-04-20 19:10 -0600
Re: fopen() of a read-only file for writing? Richard Kettlewell <rjk@greenend.org.uk> - 2012-04-21 10:20 +0100
Re: fopen() of a read-only file for writing? "Joe Shead" <Joe@SheadProgramming.com> - 2012-04-22 00:07 -0600
Re: fopen() of a read-only file for writing? "Joe Shead" <Joe@SheadProgramming.com> - 2012-04-23 15:24 -0600
csiph-web