Page 1 of 1

Directory security permissions

Posted: Fri Apr 15, 2022 9:16 am
by ecartz
Currently, Phoenix has a page that shows whether directories are readable or writable and whether they should be readable or writable. It looks something like
sec_dir_permissions_current.png
The problem is that people report that it is difficult to understand what this is trying to say. For example, images has two green check marks. That's good, right? Meanwhile, ext/scripts has two red Xs. That sounds bad. But what the interface is trying to say is that there should be matches. So both images and ext/scripts have correct permissions here.

Another possible display might look like
sec_dir_permissions_proposed.png
This has just one column. If the permissions are correct, it is green. If they are incorrect, it would be red. If the permissions are writable, it shows as a folder with a plus sign. If the permission are not writable, it shows as a lock.

My questions:

1. Is this understandable?
2. Is the lock icon better for non-writable directories than the X?
3. Is the folder-plus icon better for writable directories than the check mark?
4. Should it have two separate columns? One for the recommended permissions and one for the current permissions?
5. Or three columns? Recommended, actual current, and a third column for if they are the same.
6. Or two columns: recommended and whether they match.
7. Is there a more intuitive interface that I haven't mentioned yet?

I think we can take it as given that the directory path will always appear in any interface.

Note: I'm going to be editing this file regardless. That's not in question. The question is if I should change the interface while editing the file. And if so, to what.

Re: Directory security permissions

Posted: Fri Apr 15, 2022 2:39 pm
by Kofod95
Voted for the change you suggested - good idea!
Could we include a link to the User Guide to help people find the right permissions? Something like:
"See recommended permissions here".
Just to avoid a situation where someone has no clue at all towards getting the page right.

//Daniel

Re: Directory security permissions

Posted: Fri Apr 15, 2022 3:27 pm
by edfaught
Perhaps a simpler display option: show only the mismatches. I've found that there are only 2-3 folders/files that I need to change from the created default permissions and it seems onerous to read through the entire list (especially after the column headings have scrolled off the page).

Re: Directory security permissions

Posted: Sat Apr 16, 2022 7:08 am
by heatherbell
ecartz wrote: Fri Apr 15, 2022 9:16 am 2. Is the lock icon better for non-writable directories than the X?
3. Is the folder-plus icon better for writable directories than the check mark?
Maybe the following would be more intuitively understood and descriptive in this context.
2. fa-solid fa-file-circle-xmark
3. fa-solid fa-file-pen

Re: Directory security permissions

Posted: Sat Apr 16, 2022 8:33 am
by ecartz
heatherbell wrote: Sat Apr 16, 2022 7:08 am Maybe the following would be more intuitively understood and descriptive in this context.
2. fa-solid fa-file-circle-xmark
3. fa-solid fa-file-pen
I'm not going to update to Font Awesome 6 as part of this initiative. I believe that would be a release in and of itself, as it doesn't look like existing Font Awesome 5 icons will be forwardly compatible (unless loaded via a JS framework like React or Vue). When we are ready to do that, we can revisit these and other icons.

Re: Directory security permissions

Posted: Sat Apr 16, 2022 10:07 am
by heatherbell
ecartz wrote: Sat Apr 16, 2022 8:33 am I'm not going to update to Font Awesome 6 as part of this initiative.
Gotcha - caught out by Font Awesome showing 6 by default :roll:
Just thinking of icons that would be more intuitively understood visually as "opposites" in this context.
Maybe user-lock and user-edit makes better sense.

Re: Directory security permissions

Posted: Sat Apr 16, 2022 11:35 am
by ecartz
heatherbell wrote: Sat Apr 16, 2022 10:07 am Just thinking of icons that would be more intuitively understood visually as "opposites" in this context.
Maybe user-lock and user-edit makes better sense.
I think that the user icons are too much about people to be intuitive here. Perhaps edit or pen would go better with lock. But if you want to make up a few pairs of options, we can put up another poll.

Re: Directory security permissions

Posted: Sat Apr 16, 2022 4:43 pm
by heatherbell
ecartz wrote: Sat Apr 16, 2022 11:35 am I think that the user icons are too much about people to be intuitive here.
Without available icons specific for this use case, I think icons/graphics are, in any case, intuitively read in context and not literally read but I guessed that, although not literally, the directories are, in a way, writable by the user.
If you want to use lock for un-writable then I think lock-open would be the opposite.
Alternatively:
folder-minus for un-writable with folder-plus as opposite
folder for un-writable with folder-open as opposite
That said, considering how infrequently the page is probably viewed, I reckon it matters little whatever icons are used though I think an "explainer" on the page or a link to an "explainer" in the User Guide (as suggested in a previous post) is necessary.

Re: Directory security permissions

Posted: Mon Apr 18, 2022 7:10 am
by 14Steve14
Something else to think about.

I like the idea of two columns. One column could show what is recommended, and the other what the actual folder is. Whether icons are the best way forward I dont know. Maybe put in the the two columns the folder permission numbers so it would look the same as the numbers that people would change from within their hostings(four digits long in most cases I believe but sometimes three). Mark any mismatches by using something like black normal text for what is recommended in the first colum, and green in the second column if its a match and red if it isnt. People could then quickly see what needs changing and know what to change it to, with a helper somewhere to explain how to change things so they are all matching, unless that can be done by a click of a button with code somehow.

Just an idea.

Re: Directory security permissions

Posted: Mon Apr 18, 2022 8:43 am
by ecartz
14Steve14 wrote: Mon Apr 18, 2022 7:10 am Maybe put in the the two columns the folder permission numbers so it would look the same as the numbers that people would change from within their hostings(four digits long in most cases I believe but sometimes three).
But I don't know what the "correct" permissions are. For a writable folder, they might be any of 0777, 0775, 0755, 0750, 0570, or even 0700. Depending on how the host is configured, any of those might be correct. For a non-writable folder, any of 0775, 0755, 0750, 0570, 0555, 0550, or even 0500 might be correct. Notice how four of those are the same in both lists. I.e. the same permissions might be web writable on one server but not another.

What this page actually checks is if the web server can write to the folder. This is a simple question with a simple answer. It may require a more complex solution, but each store owner would have to discuss that with their host. It's the host that has to explain what the correct permission are for their server configuration.