LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 12-16-2016, 01:14 AM   #1
CentOSVPS
LQ Newbie
 
Registered: Sep 2016
Posts: 9

Rep: Reputation: Disabled
Folder permissions on CentOS VPS - What should I lock them down to?


Hi guys,

The following directories on my CentOS 6 install are "world writable" (as I understand it).

/dev/shm (1777)
/etc/mime.types (0666)
/tmp (1777)
/tmp/.ICE-unix (1777)
/usr/src/debug/tmp (1777)
/var/log/apache2/modsec_audit (1733)

Can someone tell me:
1. Is this how they're installed?
2. Should I lock them down? (extra big thanks if you explain the risks for each)
3. What perms should they each be changed to?

I'd be extremely grateful if anyone could take a minute to answer. Thanks for reading too!
 
Old 12-16-2016, 02:07 AM   #2
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
sticky+rwx on /tmp & /dev/shm look ok. /usr/src/debug/tmp here (I'm not sure)
This mentions /usr/local/apache/logs/modsec_audit proper permissions of 1733
(web-research: SecAuditLogDirMode 1733 [again, Idk] no-read is tricky!)

Partial answer (I'm just learning this too! Use these as clues to research):
Code:
rpm --qf '%{filemodes:octal}\n' -qf /etc/mime.types
rpm -qlif /etc/mime.types 
rpm -Vf /etc/mime.types
So, 1: one no 2: one yes: see rpm -setperms (web-search each file to get ideas on 'risks')
3: see --qf above (or you can look at a 'live' CentOS7 at linuxzoo.net!)
(ignore the 100 in 100644: see `man 2 stat` about S_IFREG 0100000 regular file)

Any ideas what may have happened to the system you are using (where did it come from)?

Look into this web-search: rpm verify repair file mode

Best wishes... let us know (esp. more specific than like 'risks?')

Last edited by Jjanel; 12-16-2016 at 03:41 AM.
 
  


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
LXer: Install CentOS Web Panel on a CentOS 6 Linux VPS LXer Syndicated Linux News 0 03-24-2015 10:42 AM
Centos 6.5 - Shared folder permissions help needed Mumoto Linux - Newbie 11 04-02-2014 04:35 AM
restore original chown permissions on VPS Centos chetanmadaan Linux - Newbie 3 06-30-2010 08:37 AM
Folder Permission Settings - CentOS 64bit vps nishan Linux - Server 1 09-09-2009 04:16 PM

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

All times are GMT -5. The time now is 07:51 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