Installing .tar File Changes User And Group To A Numeric Value

I'm trying to install a tar file and as root, when I use the following tar commands

Code:
tar -xvfp file.tar

or 

tar -xf file.tar


For some reason, it strips out the user id and group id and replaces with the the following numbers: 544 for UID and 400 for GID.

Also, from what I'm reading, it looks like tar preverses permissions from one server to another, which I didn't know.

Because of this, I can't install this file, is there a way around this?

thanks


Similar Content



Why Should I Always Use Chmod When Not As A Root User

System Info:

I have normal user in CentOS 7 whose name is "mostafa" (the name of the account).

I naturally have another user called root with all privileges. User "mostafa" is put into sudoers file, too.

The OS is installed in VmWare, so the system is all mine.

Problem:

Now I create a file with touch file.sh and put a command in it, but when I want to run it with Code:
sudo ./file.sh

, an error is shown that the command Code:
./file.sh

does not exist. But if I Code:
 sudo chmod 777 ./file.sh

then it gets run. My question is that, why should I use Code:
chmod 777

when I myself have created the file, and I am in sudoers.

Can anyone explain me why shuold I still use Code:
sudo chmod 777

when the creator of the file is me.

Assign Group Permission To Newly Created Files

Directory /media/data/torrents/ has permissions 775, user yzt, group transmission

yzt and debian-transmission are members of the group transmission.

transmission-daemon is run by debian-transmission, and the new files it downloads have permissions 644, owner debian-transmission, group transmission. This is a problem, because I can't later move the files as my user, yzt, and need to be switching to root to change the permissions/ownership to be able to do so.

Using sticky bit I could copy it to anywhere else, but I'm interested on actually moving the file, not just copying it. I could run transmission-daemon as yzt and problem solved, but I rather have that internet facing service running by a limited user, just in case some vulnerability is found on Transmission.

So my question is, how can I set that every new file created under /media/data/torrents/ has permissions 775 like its parent directory?

What Does The "T" Mean When You List File Permissions W/ Ls -l

I have a directory w/ a file that I created using:
Code:
fd = open("file", O_CREAT);

The file turned out to be executable. When I did a 'ls -l' on the directory w'/ that file it has a "T" at the end of the permissions where the executable bit would be set for the "other" group.

Setfacl Help

I can't believe I wrote a looong message and it logged me out when I tried to submit it.

So anyway, in short lines:

- I have a network of sites where all sites share same "images" folder
- I have created /home/_images/entities and symlinked it from all websites
- It works great with Apache, when I open /images/ on any of the sites I get list of images and can view them

The problem is suPHP which changes process ID of the PHP script to the file owner ID, so when I load site1.com, all scripts are executed as user1 (and files/folders created with those scripts belong to user1:user1). When I load site2.com, all scripts are executed as user2 (and files/folders created with those scripts belong to user2:user2). All these users do NOT belong to the same group, and I wouldn't like to change that as it is cPanel/WHM server so I'm afraid I'll screw something up if I change (primary?) group of all users.

Therefore I need to set it up in such way that all newly created folders and files under /home/_images/entities (owned by root) have read/write permissions for everyone.

Here's the command I used:

Code:
setfacl -Rdm o::rwx /home/_images/entities

To check it:
Code:
root@server1 [~]# getfacl /home/_images/entities/
getfacl: Removing leading '/' from absolute path names
# file: home/_images/entities/
# owner: root
# group: root
user::rwx
group::rwx
other::rwx
default:user::rwx
default:group::rwx
default:other::rwx

This looks fine, however when I try upload an image via site1.com it looks like this:

Code:
root@server1 [/home/_images/entities]# ls -l
total 24
drwxrwxrwx+ 5 root    root    4096 Jan 14 06:25 ./
drwxrwxrwx  5 root    root    4096 Jan 12 13:08 ../
drwxrwxr-x+ 3 user1   user1   4096 Jan 14 06:25 1/

And in folder "1" is the image (and thumbs folder):

Code:
root@server1 [/home/_images/entities/1]# ls -l
total 236
drwxrwxr-x+ 3 user1   user1     4096 Jan 14 06:25 ./
drwxrwxrwx+ 5 root    root      4096 Jan 14 06:25 ../
-rw-rw-rw-  1 user1   user1   225569 Jan 14 06:25 689048f221ab7c556f4d482a9d92b2d6.jpg
drwxrwxr-x+ 2 user1   user1   4096 Jan 14 06:25 thumbs/

My questions:

1) Why newly created folders do not have "write" permissions for everyone else [not user and/or group]? If I upload first image from site1.com, then I can't upload other images from any other site, while all sites can display them.

2) What is the + at the end of permissions list? (drwxrwxr-x+)

3) Why newly created files have only "rw" permissions for user, group AND everyone else, and not execute permissions? I don't actually need execute flag set here, but from my command you can see I've set "o::rwx" so it should be there (or not?)

Actually the real problem is #1 - other users can't write to this folder so users can't upload images from other sites nor other sites can create (missing) thumbnails.

Chgrp Not Changing A File?

Hello,

OS: CentOS 6.3

Background:
I'm trying to set up a situation where my FTP account is in a group where my phpbb forums were created. This will allow me to upload changes as I customize my forums (ie: .css files). However, right now, my problem is that I'm running into invalid permissions and the only way to move the files is to upload the file to a directory my FTP account has access too and then sudo cp the file over. Upon closer inspection of my files, it appears the groups the files have been made under are not the correct group.

Problem:
I am trying to use chgrp on a specific file to change the group owner to the group my FTP account is a member of but it does not seem to be working. Here is a snippet of what I'm doing:

Code:
zzz@aaaa:/var/www/html/yyy/forums/styles/GlossyBlack/theme]$ sudo chgrp apache colours.css -v
group of `colours.css' retained as apache
zzz@aaaa:/var/www/html/yyy/forums/styles/GlossyBlack/theme]$ ls
total 164
drwxr-xr-x 3 5645316 apache  4096 Mar 27 15:11 .
drwxr-xr-x 6 5645316 apache  4096 Nov 18  2012 ..
-rw-r--r-- 1  root     apache 23480 Mar 27 19:05 colours.css

I'm not sure why it still says root so I suspect I am doing something incorrect. When looking around, at first it seemed chgrp could change group owner on files but as I dug more, it seemed it can also change groups themselves. So I'm a little confused and require some clarity of experts.

I hope changing the group owner of this file will give access to my FTP account so I can apply this change to all needed locations.

Thanks.

Headless Libreoffice Doesn't Create File

I am trying to convert a PDF document from an Excel and PowerPoint document. I installed it and ran the command. It gives no warning.. Just doesn't create a new PDF document. I've successfully done this before, but I think it was a different server. I've checked file permissions, but don't think it is the issue (I've tried as a normal user and as root).

I could convert doc, docx, and txt files, but not xls, xlsx, ppt, and pptx files.

Thoughts why? Is there a verbose option or a log file which I could check for clues?

Thank you


Code:
yum -y install libreoffice-headless libreoffice-writer

Code:
Package 1:libreoffice-headless-4.0.4.2-14.el6.x86_64 already installed and latest version
Package 1:libreoffice-writer-4.0.4.2-14.el6.x86_64 already installed and latest version

Code:
libreoffice --headless -convert-to pdf myfile.xlsx

Getting And Installing Python 3.5 Help

One week user of Ubuntu v15 and I have tried to install the file Python-3.5.0a1.tar gz but without success. The following points have arisen.
1). The file was downloaded. OK
2). The file was extracted to the Desktop as Python-3.5.0a1
3). Using sudu apt-get install Python-3.5.0a1, the message 'file not found'. Why not!
4). Looking into the extracted files it seems that this is a source package and therefore cannot be installed as is?
5). Finally, using the bash command 'find' it could not find the above file either.
Can someone kindly sort this out for me.
Thanks.

Gedit Won't Save; Advanced Level?

Hello - I admit to being new to Linux. I'm not sure if this problem should be re-routed to a more advanced level, though.

I downloaded Oracle Linux ver. 7 on my server with Server settings (and a Gnome GUI). After running through the terminal basics, I tried opening gedit to test out its capabilities. It wouldn't let me save to folder; it just grayed out and I had to quit the application.

I modified gedit to -rwxrwxrwx (chmod) and took ownership of the file (chown) under my user profile and group. When that didn't work, I re-logged in as root and modified gedit back to root ownership and group, and it still won't save changes to any file location.

One more thing: gksudo didn't work, either...

Any suggestions?

About The Installation Of Awstats

I follow the below URL to install awstats .

Code:
http://thelinuxfaq.com/90-how-to-install-and-configure-awstats-in-centos-fedora-rhel

everything seems works fine , the second last step works fine.
Code:
From data in log file "/var/log/httpd/access_log"...
Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
Phase 2 : Now process new records (Flush history on disk after 20000 hosts)...
Jumped lines in file: 0
Parsed lines in file: 77
 Found 0 dropped records,
 Found 0 comments,
 Found 0 blank records,
 Found 0 corrupted records,
 Found 0 old records,
 Found 77 new qualified records.

then I tried the below URL , it shows nothing , would advise what is the possible reason ? how can I do the trouble shooting ? thanks
Code:
http://mydomain.com/awstats/awstats.pl?config=mydomain.com

Cannot Startx As Normal User

On a fresh install of Arch with little more than openbox installed when I try to startx as a regular user this is the feedback I get:
xauth: timout in locking authority file /home/tim/.Xauthority
xauth: timout in locking authority file /home/tim/.Xauthority
xauth: timout in locking authority file /home/tim/.Xauthority
xauth: timout in locking authority file /home/tim/.Xauthority
Fatal server error:
(EE) cannot open log file "/home/tim/.local/share/xorg/Xorg.0.log"
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
xauth: timeout in locking authority file /home/tim/.Xauthority

After looking into the error someone suggested to copy the file from root user. When I try to view, less, or open the file I get strange feedback "magic cookie" and then everything starts to trip out and I cant seem to reverse it without a reboot.