LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 09-29-2016, 08:00 AM   #16
JockVSJock
Senior Member
 
Registered: Jan 2004
Posts: 1,420

Original Poster
Blog Entries: 4

Rep: Reputation: 164Reputation: 164

Quote:
Originally Posted by c0wb0y View Post
SELinux enabled? Please post

ls -lZ <file name>

then grep either the <filename> on /var/log/audit/audit.log (this is distro-dependent) and look for any denied entries. We can go from there.

With SELinux, even root is restricted to do various things without modifying contexts and rules. I think this is the case.

Here is the SELinux info:

Code:
[root@server Downloads]# sestatus
SELinux status:                 enabled
SELinuxfs mount:                /selinux
Current mode:                   enforcing
Mode from config file:          enforcing
Policy version:                 24
Policy from config file:        targeted

[root@server Downloads]# ls -alZ
drwxr-xr-x. root root unconfined_u:object_r:file_t:s0  .
drwxr-xr-x. root root unconfined_u:object_r:file_t:s0  ..
-rwxr--r--. root root unconfined_u:object_r:file_t:s0  cmake-2.8.10.2.tar.gz
-rw-r--r--. root root unconfined_u:object_r:file_t:s0  httplib2-0.8.tar.gz
-rw-r--r--. root root unconfined_u:object_r:file_t:s0  Orthanc-0.7.2.tar.gz

[root@server Downloads]# id -Z
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

[root@server Downloads]#

Code:
[root@server Downloads]# sealert -av /var/log/audit/audit.log | grep -i 'cmake-2.8.10.2.tar.gz'
[root@server Downloads]#

Unless you can recommend another type of search for sealert.
 
Old 09-29-2016, 12:45 PM   #17
c0wb0y
Member
 
Registered: Jan 2012
Location: Inside the oven
Distribution: Windows
Posts: 421

Rep: Reputation: 74
Ok, SELinux is enabled then. Assuming that the destination is writable by the user.
Here's how I would approach it. Clear the audit.log file. Then open 2 terminals side by side. 1 terminal is tail'ing the audit.log while on another terminal where I would attempt to copy the file. If tail'ing is not enough, I would grep it like this

grep denied /var/log/audit/audit.log | grep cp\|cmake | less

Hope it helps.

Last edited by c0wb0y; 09-29-2016 at 12:47 PM. Reason: additional text
 
  


Reply

Tags
no read permissions, virus



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dumping master file: tmp-q05vQjwQ18: open : permission denied To learn Linux - Newbie 1 09-06-2016 12:35 AM
[SOLVED] Can't read lock file tmp .x0-lock xinit: stale nfs file handle everal Slackware 2 10-31-2011 07:11 AM
File Permission - Read an execute only file e_x_p Linux - Security 1 12-16-2009 07:08 AM
how do i get permission to move file into directory timalan SUSE / openSUSE 2 08-24-2005 09:25 PM
Create file using 'touch ./tmp.$$', file tmp.3941 is created, why? huangyanfeng Linux - General 1 04-13-2004 03:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07:45 AM.

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