Mailing List Archive

[ python-Bugs-1767242 ] os.chmod failure
Bugs item #1767242, was opened at 2007-08-03 14:02
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1767242&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Richard Heck (rgheck)
Assigned to: Nobody/Anonymous (nobody)
Summary: os.chmod failure

Initial Comment:
When running on Linux and accessing a FAT partition, os.chmod fails with otherwise sensible partitions:
>>> os.chmod("/media/IHP-100/Test.lyx", 400)
>>> os.chmod("/media/IHP-100/Test.lyx", 600)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
OSError: [Errno 1] Operation not permitted: '/media/IHP-100/Test.lyx'
The only thing that seems to be allowed is `4'.


----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1767242&group_id=5470
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[ python-Bugs-1767242 ] os.chmod failure [ In reply to ]
Bugs item #1767242, was opened at 2007-08-03 18:02
Message generated for change (Comment added) made by gbrandl
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1767242&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Pending
Resolution: None
Priority: 5
Private: No
Submitted By: Richard Heck (rgheck)
Assigned to: Nobody/Anonymous (nobody)
Summary: os.chmod failure

Initial Comment:
When running on Linux and accessing a FAT partition, os.chmod fails with otherwise sensible partitions:
>>> os.chmod("/media/IHP-100/Test.lyx", 400)
>>> os.chmod("/media/IHP-100/Test.lyx", 600)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
OSError: [Errno 1] Operation not permitted: '/media/IHP-100/Test.lyx'
The only thing that seems to be allowed is `4'.


----------------------------------------------------------------------

>Comment By: Georg Brandl (gbrandl)
Date: 2007-08-03 20:25

Message:
Logged In: YES
user_id=849994
Originator: NO

Why do you think this is Python's fault? os.chmod() is only a very thin
wrapper around the OS' chmod().

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1767242&group_id=5470
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[ python-Bugs-1767242 ] os.chmod failure [ In reply to ]
Bugs item #1767242, was opened at 2007-08-03 14:02
Message generated for change (Comment added) made by rgheck
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1767242&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Richard Heck (rgheck)
Assigned to: Nobody/Anonymous (nobody)
Summary: os.chmod failure

Initial Comment:
When running on Linux and accessing a FAT partition, os.chmod fails with otherwise sensible partitions:
>>> os.chmod("/media/IHP-100/Test.lyx", 400)
>>> os.chmod("/media/IHP-100/Test.lyx", 600)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
OSError: [Errno 1] Operation not permitted: '/media/IHP-100/Test.lyx'
The only thing that seems to be allowed is `4'.


----------------------------------------------------------------------

>Comment By: Richard Heck (rgheck)
Date: 2007-08-03 16:39

Message:
Logged In: YES
user_id=1072146
Originator: YES

Well, the shell's chmod doesn't return an error.

[rgheck@rghstudy scripts]$ chmod 600 /media/IHP-100/Test.lyx
[rgheck@rghstudy scripts]$ echo $?
0
[rgheck@rghstudy scripts]$ chmod 400 /media/IHP-100/Test.lyx
[rgheck@rghstudy scripts]$ echo $?
0
[rgheck@rghstudy scripts]$ chmod 700 /media/IHP-100/Test.lyx
[rgheck@rghstudy scripts]$ echo $?
0
[rgheck@rghstudy scripts]$ python
Python 2.4.4 (#1, Oct 23 2006, 13:58:00)
[GCC 4.1.1 20061011 (Red Hat 4.1.1-30)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.chmod("/media/IHP-100/Test.lyx", 400)
>>> os.chmod("/media/IHP-100/Test.lyx", 600)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
OSError: [Errno 1] Operation not permitted: '/media/IHP-100/Test.lyx'

I don't know what would happen in C, say.

----------------------------------------------------------------------

Comment By: Georg Brandl (gbrandl)
Date: 2007-08-03 16:25

Message:
Logged In: YES
user_id=849994
Originator: NO

Why do you think this is Python's fault? os.chmod() is only a very thin
wrapper around the OS' chmod().

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1767242&group_id=5470
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[ python-Bugs-1767242 ] os.chmod failure [ In reply to ]
Bugs item #1767242, was opened at 2007-08-03 11:02
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1767242&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Richard Heck (rgheck)
Assigned to: Nobody/Anonymous (nobody)
Summary: os.chmod failure

Initial Comment:
When running on Linux and accessing a FAT partition, os.chmod fails with otherwise sensible partitions:
>>> os.chmod("/media/IHP-100/Test.lyx", 400)
>>> os.chmod("/media/IHP-100/Test.lyx", 600)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
OSError: [Errno 1] Operation not permitted: '/media/IHP-100/Test.lyx'
The only thing that seems to be allowed is `4'.


----------------------------------------------------------------------

>Comment By: Neal Norwitz (nnorwitz)
Date: 2007-08-06 22:45

Message:
Logged In: YES
user_id=33168
Originator: NO

Note: you are *not* using octal in python, but the chmod program is using
octal:

Try prefixing 400/600 with a zero, ie: 0400 or 0600.

----------------------------------------------------------------------

Comment By: Richard Heck (rgheck)
Date: 2007-08-03 13:39

Message:
Logged In: YES
user_id=1072146
Originator: YES

Well, the shell's chmod doesn't return an error.

[rgheck@rghstudy scripts]$ chmod 600 /media/IHP-100/Test.lyx
[rgheck@rghstudy scripts]$ echo $?
0
[rgheck@rghstudy scripts]$ chmod 400 /media/IHP-100/Test.lyx
[rgheck@rghstudy scripts]$ echo $?
0
[rgheck@rghstudy scripts]$ chmod 700 /media/IHP-100/Test.lyx
[rgheck@rghstudy scripts]$ echo $?
0
[rgheck@rghstudy scripts]$ python
Python 2.4.4 (#1, Oct 23 2006, 13:58:00)
[GCC 4.1.1 20061011 (Red Hat 4.1.1-30)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.chmod("/media/IHP-100/Test.lyx", 400)
>>> os.chmod("/media/IHP-100/Test.lyx", 600)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
OSError: [Errno 1] Operation not permitted: '/media/IHP-100/Test.lyx'

I don't know what would happen in C, say.

----------------------------------------------------------------------

Comment By: Georg Brandl (gbrandl)
Date: 2007-08-03 13:25

Message:
Logged In: YES
user_id=849994
Originator: NO

Why do you think this is Python's fault? os.chmod() is only a very thin
wrapper around the OS' chmod().

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1767242&group_id=5470
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com