Create a file in /etc/ as a non-root user
Nobody
nobody at nowhere.com
Fri May 31 20:20:17 EDT 2013
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 how to create a file in /etc as non-root user?
This should not be possible. The language used is irrelevant.
More information about the Python-list
mailing list