Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: Display unix permissions on a file or directory #202

Closed
nsc-jens opened this issue Nov 8, 2019 · 5 comments · Fixed by #293
Closed

Request: Display unix permissions on a file or directory #202

nsc-jens opened this issue Nov 8, 2019 · 5 comments · Fixed by #293
Assignees

Comments

@nsc-jens
Copy link

nsc-jens commented Nov 8, 2019

We are trying to set up dcache-view as a general file access method for Swestore. There are a few things in the web GUI that we miss.

In the interface, show the unix permissions on a file or directory.

Example:

Type   Name       Permissions   Creation time           File location   Size
ICON   beer.jpg   -rwxrwxr-x    11/7/2019, 3:29:24 PM   Disk            86.1 KB
ICON   food       drwxrwsr-x    11/7/2019, 3:29:32 PM   Disk            -
@paulmillar
Copy link
Member

Hi Jens,

Although quite a few people (myself included) are very familiar with this representation of permissions, I'm wondering if this is the best way of conveying this information.

Since it should be rather easy to implement this, I would imagine adding a UNIX-ls-like field would be added first; however, perhaps we can also provide this information in a more graphic format, too.

@nsc-jens
Copy link
Author

Yes. Execute permissions is rather unimportant (unless you have NFS). And user "rwx" is also kind of uninteresting. File or directory) is kind of displayed using the Type column. This leaves rw for group or other which is little enough to perhaps display graphically.

In the best of worlds we could perhaps have booth and user configurable. As a start I'd like to see the regular unix permissions (which would also show the setuid, setgid and sticky bits). This gives a kind of familiarity to many users.

@paulmillar
Copy link
Member

Execute permissions is rather unimportant

As an aside: the x bit controls whether you are allowed to reference a directory contents (or "cd into" the directory), which is distinct from being able to list a directory (the r bit).

But, in general, I think we agree that adding this should be (relatively) easy to do and would help people, especially those familiar with UNIX/Linux.

@nsc-jens
Copy link
Author

Ah, yes. I forgot about the x-bit on directories.

ZNikke added a commit to ZNikke/dcache-view that referenced this issue May 11, 2023
Users sometimes wants to know the mode (permission) flags of objects
without having to show the file details of each individual item.

This patch adds the familiar unix ls-style representation to the file
listing.

In order to closer resemble the familiar/expected style, the common
function convertToNameValueObject() is also augmented with an optional
parameter that allows displaying the file type instead of ? since the
mode bits available doesn't include this information.

Fixes: dCache#202

Signed-off-by: Niklas Edmundsson <[email protected]>
@ZNikke
Copy link
Contributor

ZNikke commented May 11, 2023

Added a pull request with the basic addition of the ls-style mode bits.

If we add more stuff in the file listing like #201 suggests an on/off-toggle might be a good idea. I'm thinking something styled similar to the raw/formatted toggle in the view details dialog, and it having a similiar effect as the -l option to ls, ie switch of most details (perhaps only show file/dir name and size vs everything).

ZNikke added a commit to ZNikke/dcache-view that referenced this issue May 17, 2023
Users sometimes wants to know the mode (permission) flags of objects
without having to show the file details of each individual item.

This patch adds the familiar unix ls-style representation to the file
listing.

In order to closer resemble the familiar/expected style, the common
function convertToNameValueObject() is also augmented with an optional
parameter that allows displaying the file type instead of ? since the
mode bits available doesn't include this information.

Fixes: dCache#202

Signed-off-by: Niklas Edmundsson <[email protected]>
ZNikke added a commit to ZNikke/dcache-view that referenced this issue Dec 5, 2023
Users sometimes wants to know the mode (permission) flags of objects
without having to show the file details of each individual item.

This patch adds the familiar unix ls-style representation to the file
listing.

In order to closer resemble the familiar/expected style, the common
function convertToNameValueObject() is also augmented with an optional
parameter that allows displaying the file type instead of ? since the
mode bits available doesn't include this information.

Fixes: dCache#202

Signed-off-by: Niklas Edmundsson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants