Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6549777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:08:05+00:00 2026-05-25T12:08:05+00:00

I generate a file in the tmp directory of my root server. touch sync.txt

  • 0

I generate a file in the tmp directory of my root server.

touch "sync.txt"
chmod 777 "sync.txt"

and I try to delete it with python like this

os.remove('/tmp/sync.txt')

but I always get this error

exceptions.OSError: [Errno 1] Operation not permitted: '/tmp/sync.txt'

I thought this would be solved by settings the file permission to 777 but I still have this problem.

When I make

chmod 777 /tmp

instead I get another error:

exceptions.OSError: [Errno 2] No such file or directory: '/tmp/sync.txt'

However the file is deleted.

Any idea whats wrong? How can I fix that exception?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T12:08:06+00:00Added an answer on May 25, 2026 at 12:08 pm

    If /tmp is marked sticky (chmod a+t) then only the superuser or the owner of the directory or file within it will be able to delete it, regardless of what permissions the file has.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try to generate Turkish spell file for Vim from a word list with
I need to generate a file for Excel, some of the values in this
Is it possible to generate a file in javascript and then prompt the user
For testing purposes I have to generate a file of a certain size (to
Does anybody know how to generate .mht file programmatically in C#, with embedded images
I use OpenXML SDK 2.0 to generate Excel file with large amount of data,
Isn't visual studio supposed to automatically generate this file for each webservice creation ?
I'm trying to use XSLT text output to generate a file (in a file
I need a help in javah and android-ndk. I tryed to generate H-file for
I generate an excel file using XML format outlined on stackoverflow in the following

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.