Re: Create a file in /etc/ as a non-root user

2013-06-01 Thread rusi
On Jun 2, 2:19 am, Denis McMahon wrote: > On Fri, 31 May 2013 02:12:58 -0700, BIBHU DAS wrote: > > Any Idea how to create a file in /etc as non-root user?Can i use umask > > or chmod...confused > > If you don't have root access, you probably shouldn't be trying to write > in /etc. If you need

Re: Create a file in /etc/ as a non-root user

2013-06-01 Thread Denis McMahon
On Fri, 31 May 2013 02:12:58 -0700, BIBHU DAS wrote: > Any Idea how to create a file in /etc as non-root user?Can i use umask > or chmod...confused If you don't have root access, you probably shouldn't be trying to write in /etc. If you need to write in /etc, explain to the sysadmin why you

Re: Create a file in /etc/ as a non-root user

2013-05-31 Thread rusi
On May 31, 7:42 pm, Chris Angelico wrote: > On Sat, Jun 1, 2013 at 12:02 AM, Alister wrote: > > /etc is used to store configuration files for the operating system & if > > you inadvertently corrupt the wrong one then you could kill the system. > > Expanding on this: > > http://en.wikipedia.org/wi

Re: Create a file in /etc/ as a non-root user

2013-05-31 Thread Tim Chase
On 2013-06-01 01:20, Nobody wrote: > On Fri, 31 May 2013 02:12:58 -0700, BIBHU DAS wrote: > > Any Idea how to create a file in /etc as non-root user? > > This should not be possible. The language used is irrelevant. It's theoretically possible to pre-create the file (or a subdirectory) in /etc as

Re: Create a file in /etc/ as a non-root user

2013-05-31 Thread Nobody
On Fri, 31 May 2013 02:12:58 -0700, BIBHU DAS wrote: > I am a python novice;request all to kindly bear with me. > > fd = open('/etc/file','w') > fd.write('jpdas') > fd.close() > > > The above snippet fails with: > IOError: [Errno 13] Permission denied: '/etc/file' As it should. > Any Idea ho

Re: Create a file in /etc/ as a non-root user

2013-05-31 Thread Chris Angelico
On Sat, Jun 1, 2013 at 12:02 AM, Alister wrote: > /etc is used to store configuration files for the operating system & if > you inadvertently corrupt the wrong one then you could kill the system. Expanding on this: http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard The FHS applies to Li

Re: Create a file in /etc/ as a non-root user

2013-05-31 Thread Alister
On Fri, 31 May 2013 07:11:58 -0400, Dave Angel wrote: > On 05/31/2013 05:27 AM, Luca Cerone wrote: >>> fd = open('/etc/file','w') >>> >>> fd.write('jpdas') >>> >>> fd.close() >>> >>> >> Hi Bibhu, that is not a Python problem, but a permission one. >> You should configure the permissions so that yo

Re: Create a file in /etc/ as a non-root user

2013-05-31 Thread Dave Angel
On 05/31/2013 05:27 AM, Luca Cerone wrote: fd = open('/etc/file','w') fd.write('jpdas') fd.close() Hi Bibhu, that is not a Python problem, but a permission one. You should configure the permissions so that you have write access to the folder. However unless you know what you are doing it is

Re: Create a file in /etc/ as a non-root user

2013-05-31 Thread Luca Cerone
> fd = open('/etc/file','w') > > fd.write('jpdas') > > fd.close() > > Hi Bibhu, that is not a Python problem, but a permission one. You should configure the permissions so that you have write access to the folder. However unless you know what you are doing it is discouraged to save your file i

Create a file in /etc/ as a non-root user

2013-05-31 Thread BIBHU DAS
I am a python novice;request all to kindly bear with me. fd = open('/etc/file','w') fd.write('jpdas') fd.close() The above snippet fails with: Jagannath-MacBook-Pro:~ jpdas$ python testUmask.py Traceback (most recent call last): File "testUmask.py", line 3, in fd = open('/etc/file','w')