Check file permissions via SSH.....

Currently reading
Check file permissions via SSH.....

687
226
NAS
DS918+
Operating system
  1. macOS
Mobile operating system
  1. iOS
I need to check the access permissions on a file within the web host:

/Volumes/web/phpBB3/7G_log.txt

Looking at what I can see from the shard file system it does have R/W permissions for the 'http' local group. I'm just wondering if I can check this via SHH (or similar) as so far in a month the firewall system has not written details of any bots looking to attack / scan the forum. This seems strange as the forum software does detect bots visiting it.

I did make some notes as to how to get into the NAS via SSH and check permissions, and I put that note away safely. So safely I can't find where I put it.

So any assistance would be appreciated.
 
I wondered if there's a DSM Linux command that lists out file ACLs, but didn't get far looking. From what I see in Control Panel a lot of the shared folders have ACLs enabled.

On the SSH commnad line you'll see the standard read/write/execute assignment for owner, group, other permissions when using ls -l myfile_name, these are the -rwxrwxrwx. The '-' at the front would be 'd' for a directory and 'l' for a link file.
 
Okay I got logged in and navigated to the right path. ls -l [filename] gives me:

-rwxrwxrwx+ 1 dbrewood users 65 Dec 26 13:50 7G_log.txt

Which is not a lot of help.... unless the -rwxrwxrwx+ does show it should be read / writable?
 
OK so that means:
- : it's a file, of some sort​
rwx : owner dbrewood has rwx​
rwx : group users have rwx​
rwx : every other user has rwx​
+ : it has ACLs assigned​

The ACL is what you see in File Station and I didn't find (haven't time to really search) a command line way to show these, yet.
 
Thanks for that. So File Station shows that http has read / write on the phpBB3 folder (which contains the file) so the 7G firewall PHP file which is also in that directory should have the ability to write to the log file.
 
The ACL should take precedence. When I've look at other files/folders via SSH I see many shared folders have what looks like more permissive Unix access than I would expect, but then there are the ACLs that apply a different amount of access.

Using ls -l will list all visible items in the current directory, while ls -al will list visible and hidden (.dot files).

As for whether the PHP file can write to the log file will depend on which user is executing the PHP file, and do they have access to the log file. The PHP file's permission apply to which users can access it, not what it can access ... both the PHP and log files are items that have access to them controlled but that access is applied to users.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

Rusty's advice is good. An alternate would be to perform a mode 2 reset, which fixes DSM corruption.
Replies
3
Views
3,230
Click the "start" button, then Package Center, then find Storage Analyzer, click on it, select the little...
Replies
15
Views
7,018
It's probably taking a long time due to a number of reasons. There is this page in the online help (and...
Replies
1
Views
1,484
  • Question
Success!! Thank you for your time and patience! Tim
Replies
6
Views
1,312
  • Question
Hopefully the subject line makes some sense. The issue is that I can't see the sync'd link files in DSM...
Replies
0
Views
1,243

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Back
Top