amuse icon indicating copy to clipboard operation
amuse copied to clipboard

Tupan code fails building if another user owns /tmp/tupan.log

Open DavidJJansen opened this issue 3 years ago • 11 comments

If /tmp/tupan.log exists and is owned by another user, building the code fails: PermissionError: [Errno 13] Permission denied: '/tmp/tupan.log'

The place in the code where this happens is in: src/amuse/community/tupan/tupan/tupan/init.py where it has: LOG_FILENAME = os.path.join(tempfile.gettempdir(), "tupan.log")

so a simple way around it would be, to have the build process set TMPDIR to a private location, perhaps inside the build tree.

PS: I haven't checked if this is also an issue for other codes.

DavidJJansen avatar Sep 16 '21 16:09 DavidJJansen

Dear David,

Would this not simply be a matter of turning off writing the log file, or else to replace the writing to something like ./?

Simon

On Sep 16 2021, at 6:04 pm, DavidJJansen @.***> wrote:

If /tmp/tupan.log exists and is owned by another user, building the code fails: PermissionError: [Errno 13] Permission denied: '/tmp/tupan.log'

The place in the code where this happens is in: src/amuse/community/tupan/tupan/tupan/init.py where it has: LOG_FILENAME = os.path.join(tempfile.gettempdir(), "tupan.log")

so a simple way around it would be, to have the build process set TMPDIR to a private location, perhaps inside the build tree.

PS: I haven't checked if this is also an issue for other codes.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

[ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/amusecode/amuse/issues/793", "url": "https://github.com/amusecode/amuse/issues/793", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

spzwart avatar Sep 17 '21 07:09 spzwart

Yes of course, that would work as well of course.

Really one of these issues you only encounter when multiple people are building amuse at the same time, or when a previous build has crashed.

David

On 2021-09-17 09:20, Simon Portegies Zwart wrote:

Dear David,

Would this not simply be a matter of turning off writing the log file, or else to replace the writing to something like ./?

Simon

On Sep 16 2021, at 6:04 pm, DavidJJansen @.***> wrote:

If /tmp/tupan.log exists and is owned by another user, building the code fails: PermissionError: [Errno 13] Permission denied: '/tmp/tupan.log'

The place in the code where this happens is in: src/amuse/community/tupan/tupan/tupan/init.py where it has: LOG_FILENAME = os.path.join(tempfile.gettempdir(), "tupan.log")

so a simple way around it would be, to have the build process set TMPDIR to a private location, perhaps inside the build tree.

PS: I haven't checked if this is also an issue for other codes.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

[ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/amusecode/amuse/issues/793", "url": "https://github.com/amusecode/amuse/issues/793", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.": "Organization", "name": "GitHub", "url": "https://github.com" } } ] -- You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub [1], or unsubscribe [2]. Triage notifications on the go with GitHub Mobile for iOS [3] or Android [4].

Links:

[1] https://github.com/amusecode/amuse/issues/793#issuecomment-921560589 [2] https://github.com/notifications/unsubscribe-auth/ALKSO3ULH2T57DYS3XU7BKLUCLT33ANCNFSM5EFDFSYA [3] https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 [4] https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

DavidJJansen avatar Sep 17 '21 07:09 DavidJJansen

I have put in an issue in the tupan repo...let see if guilherme is still on it ;-)

ipelupessy avatar Sep 24 '21 13:09 ipelupessy

I didn't see any indication the tupan repo is active..

ipelupessy avatar Nov 18 '21 16:11 ipelupessy

so we can fork and fix...

ipelupessy avatar Nov 18 '21 16:11 ipelupessy

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Mar 04 '22 15:03 stale[bot]

tbd:

  • [ ] fork
  • [ ] fix
  • [ ] change download location

ipelupessy avatar Mar 11 '22 15:03 ipelupessy

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 28 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 10 '22 15:05 stale[bot]

see above

ipelupessy avatar May 10 '22 15:05 ipelupessy

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 28 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 09 '22 16:07 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 28 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Oct 06 '22 11:10 stale[bot]