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

user and group ? #104

Open
jgranduel opened this issue Jun 28, 2021 · 8 comments
Open

user and group ? #104

jgranduel opened this issue Jun 28, 2021 · 8 comments

Comments

@jgranduel
Copy link

Hi,

it seems user and group don't return anything. Shouldn't they display the owner and group_owner?
Thanks

@rickhg12hs
Copy link

rickhg12hs commented Jun 29, 2021

@jgranduel I'm wondering if this is an OS or filesystem issue. On my Linux/ext4 system, user and group display correctly.

@jgranduel
Copy link
Author

Thank you for your reply. It might be the issue as it works on WSL Ubuntu but not with Linux/zfs. Any workaround?

@jhspetersson
Copy link
Owner

Thanks for reporting this! I had no chance to test user and others against ZFS partition, but guess there are two possibilities:

  • uid for user name substitution fails due to some kind of unsupported auth mechanism on your system (or due to lacking of specific permissions)
  • file uids are disjoint from current user base

I'll try to set up a ZFS, and reproduce the issue.

@jgranduel
Copy link
Author

Just a quick comment. I cannot display user when I'm not the owner of the folder (even as root), but it works with my files. OS/filesystem might have been misleading? HTH.

@rickhg12hs
Copy link

I cannot display user when I'm not the owner of the folder (even as root), but it works with my files.

I've only used ZFS as part of a homework assignment long ago, but I'm wondering if some incantation of zfs allow .. might provide the more "expected behavior".

@jgranduel
Copy link
Author

I don't know zfs enough I'm afraid. Why do ls -ld .. or stat -c "%U" .. work, but not fselect? what is different in your approach? Shouldn't it work as root?

@rickhg12hs
Copy link

rickhg12hs commented Dec 19, 2024

group seems to be causing a parse(?) error.

$ fselect --version
fselect 0.8.8
Find files with SQL-like queries.
https://github.com/jhspetersson/fselect

Usage: fselect [ARGS] COLUMN[, COLUMN...] [from PATH[, PATH...]] [where EXPR] [group by COLUMN, ...] [order by COLUMN (asc|desc), ...] [limit N] [into FORMAT]

$ ls -alFR
.:
total 0
drwxr-xr-x.  3 rick rick  120 Dec 19 05:52 ./
drwxrwxrwt. 88 root root 1780 Dec 19 12:12 ../
-rw-r--r--.  1 rick rick    0 Dec 19 05:48 one
drwxr-xr-x.  2 rick rick  100 Dec 19 05:52 subdir/
-rw-r--r--.  1 rick rick    0 Dec 19 05:48 three
-rw-r--r--.  1 rick rick    0 Dec 19 05:48 two

./subdir:
total 0
drwxr-xr-x. 2 rick rick 100 Dec 19 05:52 ./
drwxr-xr-x. 3 rick rick 120 Dec 19 05:52 ../
-rw-r--r--. 1 rick rick   0 Dec 19 05:52 five
-rw-r--r--. 1 rick rick   0 Dec 19 05:52 four
-rw-r--r--. 1 rick rick   0 Dec 19 05:52 six

$ fselect mode,user,group,size,path from .
query: Could not parse tokens at the end of the query

$ fselect group from .
query: Error parsing fields, no selector found

user seems to work fine.

$ fselect mode,user,size,path from .
-rw-r--r--	rick	0	./one
-rw-r--r--	rick	0	./two
-rw-r--r--	rick	0	./three
drwxr-xr-x	rick	100	./subdir
-rw-r--r--	rick	0	./subdir/four
-rw-r--r--	rick	0	./subdir/five
-rw-r--r--	rick	0	./subdir/six

@jhspetersson
Copy link
Owner

@rickhg12hs CHEERS! omg, I fixed that in master, group field was parsed incorrectly as part of group by expression

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants