1

I'm using the latest Firefox version (112) on Gentoo, and each time I download a file (even if it's compressed and I extract it) it's read only. I can fix this by simply changing the permissions but it's tedious especially when I download a compressed file that has 15+ files.

Is there a way to fix/troubleshoot this issue?

The output of umask command is 022.

stat test-file
 
  File: test-file
  Size: 0           Blocks: 0          IO Block: 4096   regular empty file
Device: 0,22    Inode: 5056908     Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1000/   errorfof)   Gid: ( 1000/   errorfof)
Access: 2023-04-16 17:45:00.924064414 -0500
Modify: 2023-04-16 17:45:00.924064414 -0500
Change: 2023-04-16 17:45:00.924064414 -0500
Birth: 2023-04-16 17:45:00.924064414 -0500
8
  • Check your umask.
    – Daniel B
    Commented Apr 15, 2023 at 8:21
  • Are you saying the contents are marked read-only once extracted? What happens depends on what type and how it was created as well as the umask setting. Commented Apr 15, 2023 at 11:15
  • These files are not created locally, they are downloaded from websites using Firefox. So far, all types of files have a lock icon on them (read only permissions).
    – error404
    Commented Apr 15, 2023 at 23:32
  • But they are created locally, just like any other file. Where the contents that are then written to the file come from is irrelevant. Text from a text editor or downloaded data from a browser, or even files extracted from an archive, it’s all the same to the filesystem. (Some archivers preserve permissions though, so keep that in mind.) // Take a step back. Open a terminal, run touch test-file, then stat test-file. Provide the output in your question.
    – Daniel B
    Commented Apr 16, 2023 at 10:07
  • If you extract files as root, most unarchivers will default to attempting to restore the ownership and permissions the original file had when it was compressed... which might result in the file getting a different owner than yourself, or even UID/GID numbers that don't match any valid user on your system. If extracting files as a non-root user, the unarchiver will have no choice but to have the extracted file(s) owned by you.
    – telcoM
    Commented Apr 17, 2023 at 18:01

0

You must log in to answer this question.

Browse other questions tagged .