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 6469351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T05:58:50+00:00 2026-05-25T05:58:50+00:00

I am using Ubuntu Lucid Lynx is it possible to write data in a

  • 0

I am using Ubuntu Lucid Lynx

is it possible to write data in a file through a C program which has read only permission. If it’s not possible, then is there any way to give sudo access to the C program.

For files without permissions, I would save the data in a string. Then i would open the file with write option:

FILE *fp = fopen(file_path,"w")
fputs(string,fp);
fclose(fp);
  • 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-25T05:58:50+00:00Added an answer on May 25, 2026 at 5:58 am

    In Unix generally what you’d want to do is make the program’s executable owned by root, world executable, then set the SUID bit on it.

    chown root filename
    chmod 4775 filename
    

    See chomd docs for exactly what the bits mean, but all together this means that whenever someone runs this executable, they get the executable process’ user ID set to the owner’s (root).

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

Sidebar

Related Questions

I am using Git on Ubuntu 10.04 (Lucid Lynx). I have made some commits to
I'm using Ubuntu 9.04 x64 and, I have a file startup.rb in which I
I'm using South (version 0.6, the one packaged in Ubuntu Lucid Lynx) to manage
I'm using AR with Rails 3.0.9 and SQLite 3.6.22 (Ubuntu Lucid Lynx). I've added
I'm using Ubuntu 10.04 and Qt4.6, and I've created an executable binary file on
i am using ubuntu and want to know the creation time of a file
I've been using (Ubuntu's) file-roller to compress a range of files, e.g. .gz, .zip,
Using Emacs 23.2.1 on Ubuntu Lucid, any mode based on Comint inserts occasional line
I'm using Ubuntu Server 10 lucid, ruby 1.9.2-p0. In irb, the left arrow shows
I am running Ubuntu 10.04 Lucid and am developing a application in QT using

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.