Home Linux Q: Cannot access to the file. No permission. Although [-rw-rw-rw]
Reply: 1

Linux Q: Cannot access to the file. No permission. Although [-rw-rw-rw]

A.Godnov Published in 2017-10-24 14:33:22Z

I'm using CentOS 6.5

User : Erik

I cannot access to the specific file although permission is [-rw-rw-rw].
Why this happening.


--- Parent Directory ---
Dir Name : Source
Permission : [dr-r-x-r--] Owner : Erik

--- Source File List ---
header.php Erik [-rw-rw-rw-] : Can read but cannot edit file.
footer.php Erik [-rw-rw-rw-] : Can read but cannot edit file.
banner.php Erik [-rw-rw-rw-] : Can read and edit.
customer.php Erik [-rw-rw-rw-] : Can read and edit.
list.php Erik [-rw-rw-rw-] : Can read and edit.

--- Result of ls -alp
drwxr-xr-x. 2 Erik Erik 4096 2017-03-15 11:33 ./
drwxr-xr-x. 14 Erik Erik 4096 2017-03-15 11:30 ../
-rw-rw-rw-. 1 Erik Erik 1102 2017-10-24 23:07 header.php
-rw-rw-rw-. 1 Erik Erik 680 2015-01-19 13:01 footer.php
-rw-rw-rw-. 1 Erik Erik 1449 2015-01-23 09:42 banner.php
-rw-rw-rw-. 1 Erik Erik 953 2014-12-03 09:31 customer.php
-rw-rw-rw-. 1 Erik Erik 810 2014-12-03 09:31 list.php

I can't understand why I can't edit the header.php and footer.php althogh I'm Erik with permission -rw-rw-rw.

Is there any way to edit header.php & footer.php file avoid to change permission of Parent Directory. Someone please help me. This is very important to me.

Thank you in advance.

Kaizen Reply to 2017-10-25 00:35:14Z

Cause of SELinuX. You can't edit file although you permission is [-rw-rw-rw-].

The result of ls -alp shows that SELinuX is protecting your specific files.

The end of permission part, dot(.) means that file is protected by SELinuX.

If you want to edit file in owner permission, you have to change SELinuX property via root.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.33284 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO