threefoldtech / 0-hub

Threefold Images Hub
https://hub.grid.tf
Apache License 2.0
1 stars 1 forks source link

Wrong permissions metadata formation inside flist files #53

Closed AhmedYasen closed 2 years ago

AhmedYasen commented 2 years ago

I created this flist file for testing purposes. Inside it, I created a file_permissions directory which has files with different permissions.

Every file's name represents the same permissions for user, group, and others (i.e. rw permissions for ugo=rw).

I tried multiple flists with different tar.gz files and get different results but with the wrong permissions for all results.

Original one

..../file_permissions $ ls -l 
-r--r--r-- 1 ahmedyasen ahmedyasen 1024 Mar 31 14:11 r
-rw-rw-rw- 1 ahmedyasen ahmedyasen 1024 Mar 31 14:11 rw
-rwxrwxrwx 1 ahmedyasen ahmedyasen 1024 Mar 31 14:11 rwx
-r-xr-xr-x 1 ahmedyasen ahmedyasen 1024 Mar 31 14:12 rx
--w--w--w- 1 ahmedyasen ahmedyasen 1024 Mar 31 14:12 w
--wx-wx-wx 1 ahmedyasen ahmedyasen 1024 Mar 31 14:12 wx
---x--x--x 1 ahmedyasen ahmedyasen 1024 Mar 31 14:12 x

One of the results of the wrong permission

..../file_permissions $ ls -l 
-r--r--r-- 1 ahmedyasen ahmedyasen 1024 Mar 31 14:11 r
-rw-rw-rw- 1 ahmedyasen ahmedyasen 1024 Mar 31 14:11 rw
-rwxrwxrwx 1 ahmedyasen ahmedyasen 1024 Mar 31 14:11 rwx
-rwxrwxr-x 1 ahmedyasen ahmedyasen 1024 Mar 31 14:12 rx  (it adds write permissions for user and group)
--w--w--w- 1 ahmedyasen ahmedyasen 1024 Mar 31 14:12 w
--wx-wx-wx 1 ahmedyasen ahmedyasen 1024 Mar 31 14:12 wx
---x--x--x 1 ahmedyasen ahmedyasen 1024 Mar 31 14:12 x
xmonader commented 2 years ago

transferred to the right repo.

muhamadazmy commented 2 years ago

Note, we checked the flist sqlite data and the file indeed has the wrong permissions set. It's not a problem with 0-fs

maxux commented 2 years ago

Thanks for the report, I link this issue to 0-flist where the bug is most likely.

maxux commented 2 years ago

Bug confirmed: https://github.com/threefoldtech/0-flist/issues/35 On it :)

maxux commented 2 years ago

Update pushed on production, can you give it a try ?

AhmedYasen commented 2 years ago

It works now, good job.