Directory security permissions

Open to all! Ask other shopowners for help.
Post Reply

What's the best interface for the directory permissions security page?

Poll ended at Fri May 06, 2022 9:16 am

Keep it the way that it is now; that's easier to understand than the alternatives.
0
No votes
Change to the single column with lock/folder-plus and use color to indicate matches.
10
77%
Something else (please describe below).
3
23%
 
Total votes: 13

ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Directory security permissions

Post 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.
You do not have the required permissions to view the files attached to this post.


Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
Kofod95
Senior Contributor
Posts: 748
Joined: Sat Feb 06, 2021 7:38 pm
Phoenix Version: 1.0.8.20
Has thanked: 99 times
Been thanked: 179 times

Re: Directory security permissions

Post 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
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
User avatar
edfaught
Member
Posts: 49
Joined: Mon Oct 26, 2020 3:22 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 2 times

Re: Directory security permissions

Post 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).
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: Directory security permissions

Post 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
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Directory security permissions

Post 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.
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: Directory security permissions

Post 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.
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Directory security permissions

Post 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.
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: Directory security permissions

Post 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.
14Steve14
Senior Contributor
Posts: 923
Joined: Fri Oct 25, 2019 7:01 pm
Phoenix Version: v1.0.9.1
Has thanked: 17 times
Been thanked: 103 times

Re: Directory security permissions

Post 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.
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Directory security permissions

Post 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.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply