Alexey-T / CudaText_up

Bash script to download CudaText sources (all packages) and compile them. Requires Lazarus 2.0+.
MIT License
15 stars 10 forks source link

File/Folder permission #12

Closed bogen85 closed 3 years ago

bogen85 commented 3 years ago

From the readme.md for CudaText_up:

Better run script via "sudo", otherwise new folders will have
mode rw-r--r-- and resulting CudaText binary cannot create
its config settings/user.json

Is this simply a folder/file permission issue? Should not a setting a different umask or folder perm fixup suffice without resorting to something so drastic as running a build script as root?

What exactly needs to be accomplished here? If this is just about file/folder permission, sudo is obviously not necessary, and should not be recommended, as there are much safer ways to address this.

If this is about file/folder ownership, that is a separate issue, and is usually in regard to building an archive, and fakeroot is typically used there to avoid using sudo or some other running as root.

I'm working on CudaText_up_py and need to know specifically what needs to be addressed here in regard to file/folder permissions, as I will not be recommending it be run as root or via sudo, but of course I need the resulting files/folders to have the correct permissions.

Alexey-T commented 3 years ago

What needs to be addressed here is mode of new Cud dir- dir of executable, it must be rw-rw-rw , but I am not sure what exactly did not work, otherwise, I forgot that details..

bogen85 commented 3 years ago

Thanks. I'll address this in CudaText_up_py without needing sudo or some other run as root.

Closing this here. If I use umask, we may be able to back port that fix to non python CudaText_up, if the two don't get merged.

Alexey-T commented 3 years ago

I suggest to not merge. it is good that we will have 2 versions of cudatext_up.