0
votes
1answer
84 views

Unable to retain any root created files and folders after warm reboot in linux

I installed and ran petalinux on zynq board. It runs perfectly fine and boot in around 3 seconds. To boot it this fast I had to do some configuration before compiling the source. The problem that I ...
1
vote
1answer
411 views

Avoid errors from tar failing to restore directory permissions

I observe the following behavior with both tar 1.26 and 1.27.1: $ mkdir a b a/diffowner $ sudo mkdir b/diffowner $ sudo chmod a+w b/diffowner $ echo foo > a/diffowner/foo $ tar -C a -cvf test.tar ...
1
vote
2answers
519 views

Always have to chown when adding new file? Centos 6

Whenever I upload a new file to my server, I have to chown -R apache:apache /dir in order for it to be accessible. Is there an easier way around this?
0
votes
2answers
91 views

changing the ownership of a file in linux

I have a file "test" on an Ubuntu system owned by the root. The ls -l option is shown below. $ ls -l test -r--r----- 1 root abacus 373 Nov 12 19:19 test I know that only the owner of a file can ...
0
votes
3answers
1k views

Why user becomes nobody?

I have a problem about linux user, I use a command to add user like: useradd -u 532 -d /data/test01 -g test test01 but when I login as test01 and run mkdir x, it becomes like: nobody test x ...
3
votes
2answers
371 views

shell script - How to output the owner of a file

Is there a command to output the owner of a file, and nothing else? I suppose I could use ls and run it through sed, but if there is a better way, I would definitely use it. Thanks in advance.
2
votes
1answer
245 views

When I create files the owner / group is always root

On Linux, I am logged in as another user, I have added myself to wheel. wheel:x:10:root,allan I have uncommented the lines of /etc/sudoers ## Allow root to run any commands anywhere root ...
0
votes
2answers
601 views

Have sudo create files under your own user id?

If I wanted to do something like sudo fdisk -l > test.txt but I wanted test.txt to be under my own user ID (and not root) without having to chown it afterwards, is there a way to do this? ...
2
votes
1answer
230 views

What privilege is required to preserve ownership of a file on copy, and how do you get it?

I have a homework question about kernel programming in Linux. The question is: What Linux-specific privilege is required to preserve ownership of a file when it's copied, and how do you get it? ...
4
votes
2answers
212 views

Restrict device ownership to root only. But why?

NSA's Guide to the Secure Configuration of Red Hat Enterprise Linux 5 recommands restricting device ownership to root only. So my question is why should we restrict device ownership to root? And ...
10
votes
3answers
919 views

How to make a file editable by two different users in different groups?

I have a folder at /home/www/, and the owner is www, which is part of the www-group. I have another user, john, part of the john group. How can I chown /home/www/ to make it writable by both www and ...