0
votes
0answers
47 views

Root user can't do everything? [duplicate]

Possible Duplicate: Redirecting stdout to a file you don’t have write permission on I'm quite new to Linux and I have a permissions questions. I'm using Linux Mint. If I go to /opt and do ...
3
votes
2answers
383 views

How to add a line to a file which has only root write permission and to continue the script execution

I am trying to learn bash scripting. I am working on a practical problem and at one point I need to add a line to a file which requires root permission to write. The code looks like this: # some ...
6
votes
2answers
3k views

Write to a file without redirection?

I am writing a regular compiled application that needs to create a special file and write a magic cookie into it. I can’t write the file directly from the application, the system security model ...