You are not logged in.

#1 2021-09-13 02:12:13

korimitsu
Member
Registered: 2016-08-14
Posts: 194

Created files and folders don't have write permission by its user

No idea if this is intended or well configured, but for some reason, files and folders created by me (user), don't have write permissions:

[user@arch ~]$ mkdir sample
[user@arch ~]$ touch sample/file.txt
[user@arch ~]$ ls -lsaR sample/
sample/:
total 8
4 drwxr-xr-x  2 user user 4096 Sep 13 10:06 .
4 drwx------ 17 user user 4096 Sep 13 10:06 ..
0 -rw-r--r--  1 user user    0 Sep 13 10:06 file.txt

In Ubuntu it's different:

[user@ubuntu ~]$ mkdir sample
[user@ubuntu ~]$ touch sample/file.txt
[user@ubuntu ~]$ ls -lsaR sample/
sample/:
total 8
4 drwxrwxr-x  2 user user 4096 sep 12 10:09 .
4 drwxr-xr-x 38 user user 4096 sep 12 10:08 ..
0 -rw-rw-r--  1 user user    0 sep 12 10:09 file.txt

Any help here? I'm running with issues compiling some software because scripts detect folders as not writable.

Mount root point for Arch and Ubuntu are:

/dev/sda1 on / type ext4 (rw,relatime)

Last edited by korimitsu (2021-09-13 03:08:10)

Offline

#2 2021-09-13 03:11:56

hdert
Member
Registered: 2020-11-22
Posts: 5

Re: Created files and folders don't have write permission by its user

This is probably related to your umask:
you can see your umask using

[user@arch ~]$ umask -S
u=rwx,g=rx,o=rx

Your umask determines the permissions applied to any new folders or files. By default it is 022, which gives the permissions 755, or rwxr-xr-x (644, or rw-r--r-- for a file).
The umask on your arch system should allow your user to modify the files, but on Ubuntu, it will also allow members of the group "user" to modify your files.
I don't see how this is related to the git clone failure, if you could post the output of the failed git clone (and umask), I can try and help you with it.

I hope this helps, Justin

Offline

#3 2021-09-13 03:39:20

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,498
Website

Re: Created files and folders don't have write permission by its user

Those files / directories do have write permission for your user - just not for the users group.  What is the "some software" that is failing?  There is no way it should be trying to use your default group - some software creates / uses it's own group for it's own content, but that has nothing to do with building  it.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2021-09-13 04:12:41

korimitsu
Member
Registered: 2016-08-14
Posts: 194

Re: Created files and folders don't have write permission by its user

duplicate

Last edited by korimitsu (2021-09-16 18:09:35)

Offline

#5 2021-09-13 06:19:10

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,256

Re: Created files and folders don't have write permission by its user

 4 -rwxr-xr-x  1 user1 user1  120 Sep 12 10:37 pyc

It's 755 and an executable script.
The problem is MUCH MORE likely the script itself

#!/usr/bin/env python2

import py_compile
import sys

py_compile.compile(sys.argv[1], cfile=sys.argv[2], doraise=True)
type python2
pacman -Qo python2

https://archlinux.org/packages/extra/x86_64/python2/ - but you may try/ask whether you get away w/ changing the shebang to python or python3

Offline

#6 2021-09-13 11:26:32

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,498
Website

Re: Created files and folders don't have write permission by its user

Ah, yeah, there is no indication whatsoever from the log posted in that github link that there is any problem with the permissions of the files or directories - so this is totally an X-Y problem, and it's precisely why we want to see the actual error messages.

The error in that cmake output is a permission denied on line 1 of the pyc script.  This would be do to the shebang, or the permissions of the script file itself, but not the files or directories it's trying to work on - it never got that far.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2021-09-14 16:40:32

korimitsu
Member
Registered: 2016-08-14
Posts: 194

Re: Created files and folders don't have write permission by its user

The reason why it fails has been found. More info on github link.

Offline

Board footer

Powered by FluxBB