• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

different file and folder permissions

NeghVar

2[H]4U
Joined
May 1, 2003
Messages
2,685
I have an Ubuntu-base Linux OS and I need to set certain permissions for a folder and its files. I need to set the folder as RW but the files as R. So, I want to copy, move or create files in the folder, but the files themselves need to be read only (except for root access). I know the chmod command, but based on what I have read, it seems to set permissions for both the folder and the files within it. Any advice?
 
Are you wanting to have the default permissions when you create a new file in the directory different than what the directory has? Is that what you are asking?


For the current folder & files you can change the folder first, then go in and change the files next.

chmod 640 directoryx
cd directoryx
chmod 440 *.*

Or if you are wanting it so only you can read and write, it would be

chmod 600 directoryx
cd directoryx
chmod 400 *.*
 
Thanks. It is for a system to store dd hard drive images for forensic analysis.
 
What I posted works the first time, but when you add new files to the directory, I don't know that they will default to 440 or 400.
 
You generally need execute permissions on directories so be sure to use 750 or 700 or 755.
 
Back
Top