Selur's Little Message Board
Esxi running macos For selur - Printable Version

+- Selur's Little Message Board (https://forum.selur.net)
+-- Forum: Talk, Talk, Talk (https://forum.selur.net/forum-5.html)
+--- Forum: Small Talk (https://forum.selur.net/forum-7.html)
+--- Thread: Esxi running macos For selur (/thread-1495.html)



RE: Esxi running macos For selur - l33tmeatwad - 21.09.2020

lol... Permissions is not some advanced coder stuff, it's basic user level info.  The default should be not to keep permissions if I recall correctly, just wanted to make sure you didn't change that.


RE: Esxi running macos For selur - shijan - 21.09.2020

Maybe it is just some mistake in Hybrid components itself? If i open package with Pacifist and sort list by permissions, there is a group of binaries that have totally different permission flags. 
[Image: HtYoBSI.jpg]

Here is for test package with Hybrid_wip_2020_09_19 alone untouched directly from archive. https://drive.google.com/drive/folders/1nHz8jhVx3kMqbcTJ06QchKjVU52YvuZx?usp=sharing


RE: Esxi running macos For selur - shijan - 21.09.2020

Also seems it is impossible to manually change permissions in those files with Packages tools.
I add checkboxes
Collapse app contents back to normal
build pkg
... and see same "incorrect" permissions inside.

Script files also have different permissions. But again i have no idea about those permissions and how and why to change them.

[Image: icUp7bb.jpg]

I also got same error if i apply same code as Selur to Hybrid installed from PKG.
shph$ "/Applications/Hybrid.app/Contents/MacOS/mediainfo" --Language=en --File_TestContinuousFileNames=0 "--LogFile=/Users/shph/Desktop/mediaInfoLog.txt" --Full "/Users/shph/Desktop/bartos-hybrid.mov"
-bash: /Applications/Hybrid.app/Contents/MacOS/mediainfo: Permission denied
shphs-iMac:~ shph$

No error if i use same Hybrid version dragged and dropped without installer.
shph$ "/Applications/Hybrid.app/Contents/MacOS/mediainfo" --Language=en --File_TestContinuousFileNames=0 "--LogFile=/Users/shph/Desktop/mediaInfoLog.txt" --Full "/Users/shph/Desktop/bartos-hybrid.mov"
General
Count                                    : 331
Count of stream of this kind             : 1
Kind of stream                           : General
Kind of stream                           : General
Stream identifier                        : 0
Count of video streams                   : 1
Video_Format_List                        : ProRes
Video_Format_WithHint_List               : ProRes
Codecs Video                             : ProRes

(20.09.2020, 23:28)l33tmeatwad Wrote: Oh yeah, one more tip for the installer is to not keep existing permissions when importing files.
There is also one more permissions settings checkbox when i drag and drop file directly to Packages Payload tab list. And i also didn't touch that option because had no idea of its purpose.
[Image: 0rHjScK.jpg]


RE: Esxi running macos For selur - Selur - 21.09.2020

You can find a nice intro into file system rights here: https://www.linux.com/training-tutorials/understanding-linux-file-permissions/ + https://www.howtogeek.com/669095/how-to-set-file-permissions-on-mac/
In short:

a. rights are written down in four categories:
1. directory: in case it's a directory 'd' should be written here otherwise '-'
2. owner: what rights does the owner of the file have
3. group: what rights does the group of the file have
4. others: what rights do all others have

b. there are three right that can be give:
- read rights ®: allows to read the file
- write rights (w): allows to change/delete the file
- execute (x): allows to start the file (open a directory)

c. rights in a category (ignoring the directory category) are written as a number or a tripple.
When written as a tripple (three characters):
- the first is always 'r' or '-' to indicate whether the user has read access or not
- the second is always 'w' or '-' to indicate whether the user has write access or not
- the third is always 'x' or '-' to indicate whether the user has execute access or not
when written as a number, the number is the sum of the rights
r=4
w=2
x=1
no rights = 0

so:
0 6 5 5 = - rwx r-x r-x
means:
a. it's not a directory
b. owner has full rights
c. group has only read and execute
d. others have only read and execute



Rights on a file can be changed through finder somehow, but also through the command line using:
sudo chmod RIGHTS-NUMBERS PATH-TO-FILE
for example:
sudo chmod 0655 /Application/Hybrid.app/Content/MacOS/MP4Box
would change the rights of the file to 0655 (see above)

Also you can change the owner and the group associated with:
sudo chown owner:group PATH-TO-FILE
for example:
sudo chown selur:staff /Application/Hybrid.app/Content/MacOS/MP4Box
would set the owner to 'selur' and the group to 'staff'

usually you expect that the owner is the one that installs the tool and the group is the group the user belongs to.
Side note about groups on mac os:
There are four special groups on mac os:
a. root = root user
b. wheel = users that can use sudo
c. staff = normal 'registered users'
d. admin = users in the administrator group


----------

Hope this helps a bit to understand what is happening.
Depending on who the owner is and which group a file is associated with the rights need to be adjusted usually one uses.

So usually:
- all the applications in the MacOS folder should have 0655 as rights
so that the owner can change the application and others can read and execute the application
- all the python scripts should have 0611
so that the owner can change the script and others can only read the script

Quote:No error if i use same Hybrid version dragged and dropped without installer.
That is because when using drag&drop the owner (usually) is the one that drag&dropped the file.
When using the installer, the rights are set through the installer. Smile (If the installer needs admin rights by default the owner should be root)

Cu Selur


RE: Esxi running macos For selur - Selur - 21.09.2020

moved the thread to 'Small Talk' since it's Hybrid based and not general a/v talk.


RE: Esxi running macos For selur - Selur - 21.09.2020

Uploaded a new version where I adjusted the rights of mediainfo&co to 0655 which hopefully helps with the installer.

Cu Selur


RE: Esxi running macos For selur - shijan - 21.09.2020

Seems i also was able to fix old version. The main question - is there any other critical files with incorrect permissions inside?

I apply
sudo chmod 0655

Then this to "activate" binary
sudo chmod +x

Created PKG, Installed Hybrid, and mediainfo works

"/Applications/Hybrid.app/Contents/MacOS/mediainfo" --Language=en --File_TestContinuousFileNames=0 "--LogFile=/Users/shph/Desktop/mediaInfoLog.txt" --Full "/Users/shph/Desktop/bartos-hybrid.mov"

Try to test package 2 Hybrid only https://drive.google.com/file/d/1I3GlhCwts5D0kxzQ7yqIEmN6OwBLyAJD/view?usp=sharing
In same folder there is a separate temporary installer for VS filters only


RE: Esxi running macos For selur - Selur - 21.09.2020

Quote:Try to test package 2 Hybrid only. (old version)
https://drive.google.com/drive/folders/1tley3-jnXjDQCKagKAS4WLeiSqIaA5D6?usp=sharing <- empty Vapoursynth folder
https://drive.google.com/file/d/1I3GlhCwts5D0kxzQ7yqIEmN6OwBLyAJD/view?usp=sharing <- Plugin installer
no link to Hybrid installer,...


RE: Esxi running macos For selur - shijan - 21.09.2020

It was wrong link.
Here it is https://drive.google.com/drive/folders/1nHz8jhVx3kMqbcTJ06QchKjVU52YvuZx?usp=sharing

Also uploaded Hybrid_wip_2020_09_21 test installer. Those bins permissions sill looks slightly different inside. It is not 0655. But MediaInfo works

[Image: 7zA2Kry.jpg]


RE: Esxi running macos For selur - Selur - 21.09.2020

That link worked. Smile
Installation worked, analysis of an input file ran through without a problem.
Vapoursynth Preview seems to work fine.
Encoding works fine.
-> nice Smile

MP4Box fails since:
a. the rights of the files in the MacOS/lib/ folder all need to be 0755
Thinking about instead of 0655 the other applications should also be 0755 Smile
b. MP4Box aborts with:
[Core] default modules not found
[core] Cannot create config file GPAC.cfg in /Users/selur/.gpac directory
Fatal error: failed to initialize GPAC global configuration
which is strange since the folder (/Users/selur/.gpac) and is owned by my user and Hybrid is also executed by my user. :/
-> my guess is other tools might have issues too, there's still some rights problem

Cu Selur