[Discuss] How to always force the group and permission ?

mskala at ansuz.sooke.bc.ca mskala at ansuz.sooke.bc.ca
Thu Jun 12 05:01:01 PDT 2014


On Thu, 12 Jun 2014, Bob wrote:
> But the newly created files/folder missing rwx permission on group levels which make it
> impossible for other ssh users (belong to www-data group) to edit files.
>
> Is it possible to have required permission on group level ? ACL not possible as filesystem is ext4.

You can use the "umask" command to set a default permission level for new
files.  Put this in a .bashrc file or similar and it will affect
subsequent operations.  If I'm correctly understanding what you're trying
to accomplish, I think that will probably work for you.  However, umask
only sets a default; it can potentially be overridden by the processes
that create the files or directories and I don't think there is a general
and absolute way to prevent them from doing so (short of drastic measures
like running everything through a special FUSE filesystem that intercepts
the permission-setting calls).  You can set up a cron job to change the
file permissions periodically if they continue getting set to something
other than what you want.

-- 
Matthew Skala
mskala at ansuz.sooke.bc.ca                 People before principles.
http://ansuz.sooke.bc.ca/


More information about the Discuss mailing list