This post was made before OP gave the additional info that he's using a windows filesystem (NTFS) on a linux machine. I was under the impression he's using a native linux filesystem.
You need to set the read, write and executable flag for the owner, and the read, executable flag for the group for mydirectory.
The executable flag is needed to enter the folder. Without it you get a "permission denied" when trying to
cd myfolder as a user belonging to the group or other.
chmod 755 myfolder is giving access for the group and others, or
chmod 750 myfolder just giving access for the group and lock others out.
Set the ownership to root and the group to users:
sudo chown root:users myfolder
Now, only root can create new files in myfolder ie.
sudo touch mytest
the new file gets the ownership
root and the group
To force new files getting the group users, you need to set the SGID bit to myfolder.
this can be done in two ways, which results are equal
sudo chmod +s myfolder (adding the sgid bit)
sudo chmod 2755 myfolder (same + user, group, others)
ls -l should show something like this:
drwsr-sr-x myfolder # last x optional depending on your others setting
if you now
sudo touch mytest2 in
myfolder, mytest2 belongs to
root, and the group
users with the permission 644
Existing Files in myfolder would be treated like this:
sudo chown root:users *
sudo chmod 644 *
1 = execute
2 = write
4 = read
read + write = 4 + 2 = 6
P.S.: You can replace root with any user, users with any group
as requested by @Rastapopoulos a further explaination
Let's assume myfolder belongs to tom
When doing a
chmod -R 444 myfolder/
you set the folder for user (tom), group, others to read only and all files within it, too
So no nobody would be able to enter the folder, even tom (except root) because it's lacking the executable flag.
When doing a
chmod 644 myfolder tom still can't enter the folder.
The correct way would be to set the read, write, executable flag for tom, and the read executable flag for the group/others.
(executable flag = 1)
chmod 755 myfolder (only setting permission for myfolder, not files)
To change only the permission for files in myfolder but not the permission for myfolder you'd do a:
chmod 444 myfolder/*
But you might probably still want to edit/write your files as owner/tom so you'd rather do a
chmod 644 myfolder/* (or 640)