How to create a file with read access rights

half.italian at gmail.com half.italian at gmail.com
Thu Jun 21 11:45:11 EDT 2007


On Jun 21, 8:27 am, Johny <pyt... at hope.cz> wrote:
> Is  it possible to  create a file on Linux  with access rights?
> For example
>  owner can read and write into the file
> others can only read from the file
> Thanks for replies
> L.

That all depends on your umask.  Most commonly, the default value is
022 which translates to 755 or ower has full control, and all others
can read and execute.  If you'd like to change a specific files
permissios with python, look into os.chmod()

~Sean




More information about the Python-list mailing list