I want to create a file which can't change file name on Windows or any operating system? I try ussing function "read-only" on Windows but it not working. Am I wrong somewhere? or any sussgest for me.
Asked
Active
Viewed 218 times
0
-
3That is not possible. Any user with proper permissions can change name of any file. Or you may use any third party software to lock the file for renaming. – Sandeep Jul 05 '18 at 07:02
-
You can do it - but you can do nothing with this file after you do it until rename (maybe including to see this file in the folder under its real name or at all). One of those methods is direct renaming of the file inserting a byte(s) which cannot be processed correctly by OS file requestor (char(0) for example). Remember - those file can be renamed via its 8.3 shortname if they're not disabled on the volume or OS. – Akina Jul 05 '18 at 07:36
-
@Akina Never heard of any such thing ever. Can you please post an example about how this can be done? I know, we can add special character by using `Alt +
`, but even that can be renamed. – Sandeep Jul 05 '18 at 09:16 -
@Sandeep *I know, we can add special character by using `Alt +
`* No, you try to rename using explorer or another program - using OS FILE-access procedures. Everything they make they can revert. But I mean direct access to HDD or volume, without regard to the file system. Direct altering byte(s) on disk. – Akina Jul 05 '18 at 09:29 -
Thanks for all the help. I'm just trying to figure this out and have never seen this happen before. – xPain Jul 05 '18 at 10:27
-
I did want to point out that this is possible with Windows and setting ACL NTFS permissions accordingly as per a recent answer I wrote here with the applicable commands: https://superuser.com/questions/1335528/deny-delete-access-for-a-user-to-file-but-allow-it-execute-access/1335577#1335577. This likely won't stop you from booting Linux and renaming from it unless you encrypt it with EFS and/or bitlocker encrypt the HD in conjunction with the ACL NTFS permissions as listed on that post. This will also lock down the folder so you'll not be able to write to it afterwards. – Vomit IT - Chunky Mess Style Jul 05 '18 at 11:28
-
@PimpJuiceIT Thanks. It is very helpful to me – xPain Jul 06 '18 at 09:54