Re: Git config command ignores explicitly set file permissions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Riddell, Matthew A" <mriddell@xxxxxxxxxxx> writes:

> I noticed while working with Git that the file permissions on the
> gitconfig file is ignored and the parent folder permissions are
> used instead to update the file.  An example is as follows:
>
> Before running git config ensure the user running the command is
> not able to edit the file but has read access to the file. Ensure
> the User has full access to the parent folder.  After running any
> git config command the user previously without edit permissions on
> a file can now edit the config file.

That is pretty much how things are intended to work on a filesystem
and is not limited to Git.  Your arrangement, contrary to what you
said, does not "ensure the user running the command is not able to
edit but has read access".

    mkdir newdir
    chmod +rwx newdir
    >newdir/file
    chmod a-w newdir/file

would not forbid you from doing

    rm -f newdir/file
    ehco new >newdir/file

In other words, if you allow your user to write to a directory, you
cannot forbid the user from creating and removing files in it.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux