This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: os.remove error on Solaris
Type: Stage:
Components: None Versions:
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, loewis, rphilips
Priority: normal Keywords:

Created on 2005-02-28 11:44 by rphilips, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg24407 - (view) Author: Richard Philips (rphilips) Date: 2005-02-28 11:44
According to the documentation, when os.remove is
applied to a directory, OSError should be raised.

On Solaris, this is not the case: the directory is
removed BUT the link count on the parent directory does
NOT change.  File system corruption is the result.

Python details:
Python 2.3.4 (#3, Jun 18 2004, 10:14:55)
[GCC 3.2.2] on sunos5

Solaris details:

Number of CPUs is        2
CPU Type is              sparcv9+vis2
CPU Speed is             750 MHz
App Architecture is      sparc
Kernel Architecture is   sun4u
Kernel Bit Size is       64
OS Name is               SunOS
OS Version is            5.8
OS Distribution is       Solaris 8 7/01 s28s_u5wos_08 SPARC
Libc Name is             libc
Libc Version is          1
Kernel Version is        SunOS Release 5.8 Version
Generic_108528-20 64-bit


 
msg24408 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2005-03-03 22:50
Logged In: YES 
user_id=21627

This seems to be a bug report, not a patch, so I'm
reclassifying it.

Is there any chance that you tried os.remove as a superuser?
Python invokes unlink; according to the OS man page, unlink
gives EPERM when the file to remove is a directory.

I consider this a bug in the operating system: it should not
be possible, not even for the superuser, to corrupt the file
system using standard system calls. I don't know what the
rationale is for this behaviour.

msg24409 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-07-30 11:36
Logged In: YES 
user_id=849994

I don't think Python should do anything other than calling
the system's unlink().
History
Date User Action Args
2022-04-11 14:56:09adminsetgithub: 41634
2005-02-28 11:44:29rphilipscreate