LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 02-20-2017, 12:41 PM   #1
drillsar
Member
 
Registered: Jan 2017
Posts: 144

Rep: Reputation: Disabled
weird stuff happening on server-help


when I install any package and do a ls -Z

this is what I get:

see the ? mark.. in logrotate this happens with any packages being installed and don't know why.

drwxr-xr-x. root root system_ubject_r:var_lib_t:s0 initramfs
drwxr-xr-x root root ? logrotate
drwx------. root root system_ubject_r:var_lib_t:s0 machines
drwxr-xr-x. root root system_ubject_r:var_lib_t:s0 misc
drwx------. root root system_ubject_r:NetworkManager_var_lib_t:s0 NetworkManager
 
Old 02-20-2017, 01:59 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,324
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
Just to clarify, do the files really have smilies in them, or do they have the text equivalent (a colon and whatever makes the open mouth). (As an aside, my question could have been avoided with the use of "code" tags, which become available when you click "Go Advanced" just below the "compost post" window.)

My first guess is that this is a "LANG" issue of some sort. What is the output of the locale command?

Last edited by frankbell; 02-20-2017 at 02:02 PM.
 
Old 02-20-2017, 05:18 PM   #3
drillsar
Member
 
Registered: Jan 2017
Posts: 144

Original Poster
Rep: Reputation: Disabled
no reads like this; I don't know how to fix the unconfined _u

Code:
drwxr-xr-x. redis          redis          unconfined_u:object_r:redis_var_lib_t:s0 redis-6379

Last edited by drillsar; 02-20-2017 at 05:19 PM.
 
Old 02-20-2017, 05:22 PM   #4
drillsar
Member
 
Registered: Jan 2017
Posts: 144

Original Poster
Rep: Reputation: Disabled
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
 
Old 02-20-2017, 06:10 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,703

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Its not a LANG problem. My knowledge of selinux is limited and at the moment I do not know why installing packages would change the security context of logrotate.

https://www.cyberciti.biz/faq/rhel-c...xt/#more-11302

https://docs.fedoraproject.org/en-US...ing_Files.html
 
Old 02-20-2017, 07:11 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,324
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
Thanks for the text snippet. It removes a distraction.

I am also lttle experienced with SELinux, but, just for fun, I did this on my Slackware system:

Code:
$ ls -Zl
total 22068
-rwxr-xr-x 1 root root ?    8704 Oct 23  2013 accton
-rwxr-xr-x 1 root root ?   44360 Feb  9 17:34 adjtimex
-rwxr-xr-x 1 root root ?   53384 Feb  9 17:34 agetty
-rwxr-xr-x 1 root root ?   55360 Jul 26  2012 arp
-rwxr-xr-x 1 root root ?   47752 Feb  7 14:00 arpd
-rwxr-xr-x 1 root root ?   19312 Aug 20  2015 arping
-rwxr-xr-x 1 root root ?   27024 Sep 15 18:47 badblocks
-r-xr-xr-x 1 root root ?   13721 Dec 13 15:06 blkdeactivate
-rwxr-xr-x 1 root root ?   27048 Feb  9 17:34 blkdiscard
(snip rest of output, which is similar)
Then I did this as root:

Code:
# ls -Zl 
total 22068
-rwxr-xr-x 1 root root ?    8704 Oct 23  2013 accton
-rwxr-xr-x 1 root root ?   44360 Feb  9 17:34 adjtimex
-rwxr-xr-x 1 root root ?   53384 Feb  9 17:34 agetty
-rwxr-xr-x 1 root root ?   55360 Jul 26  2012 arp
-rwxr-xr-x 1 root root ?   47752 Feb  7 14:00 arpd
-rwxr-xr-x 1 root root ?   19312 Aug 20  2015 arping
-rwxr-xr-x 1 root root ?   27024 Sep 15 18:47 badblocks
-r-xr-xr-x 1 root root ?   13721 Dec 13 15:06 blkdeactivate
(snip rest of output, which is similar)
This leads me to ask, are you running the ls -Z command as user or as root?
 
Old 02-20-2017, 07:22 PM   #7
drillsar
Member
 
Registered: Jan 2017
Posts: 144

Original Poster
Rep: Reputation: Disabled
yes if SELinux is disabled you get a ? mark. However, I think disabled is a security risk. Right now I have it in permissive mode. I think I solved it..

I am guessing your SELinux is disabled

The thing is what I read if you make dir's that aren't commong loccations you get unconfined_u

running command:
semanage -a -t redis_var_lib_t '/var/lib/redis-6379(/.*)?'
restorecon -RF /var/lib/redis-6379

fixed it for me
of course you have to make sure the file type..
for some reason restorecon -Rv didn't work

Last edited by drillsar; 02-20-2017 at 07:26 PM.
 
Old 02-20-2017, 08:05 PM   #8
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,324
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
Quote:
I am guessing your SELinux is disabled
As I mentioned, I'm using Slackware, which does not include SELinux by default.

At least in my case, I conclude that user is not permitted to see the security context, whereas root is.

Sorry I can't help more.

Last edited by frankbell; 02-20-2017 at 08:08 PM.
 
Old 02-21-2017, 10:49 AM   #9
drillsar
Member
 
Registered: Jan 2017
Posts: 144

Original Poster
Rep: Reputation: Disabled
I didn't think of that. you maybe correct
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] In Porteus weird stuff is happening when I insert a USB flash drive Gregg Bell Linux - Newbie 7 04-20-2016 08:11 PM
[SOLVED] weird thing is happening for -f switch sysmicuser Linux - Newbie 24 03-03-2012 06:42 AM
[SOLVED] Weird thing happening to my computer after installation dsplayer14 Slackware - Installation 4 11-12-2011 11:26 AM
Weird thing happening with GTK apps lancelott *BSD 0 06-22-2004 03:27 PM
Weird things are happening saiz66 Slackware 8 05-17-2003 12:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 06:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration