Options
Control characters used in a file name.windows 2k3 server
is there a way to lock down the characters that a user can have for a file name?
also is there a way to lock down the file name length?
I've seen issues with windows and long paths to a file..... over 255 characters
back ground is someone asked if we can write them a custom program to stop users form using special characters in file names.
also is there a way to lock down the file name length?
I've seen issues with windows and long paths to a file..... over 255 characters
back ground is someone asked if we can write them a custom program to stop users form using special characters in file names.
Comments
-
Optionstiersten Member Posts: 4,505No. Not without some horrendous hack involving patching or hooking the syscalls in the kernel & filesystem as you'd need to get in there at a very low level to stop this.
-
OptionsRobertKaucher Member Posts: 4,299 ■■■■■■■■■■No. Not without some horrendous hack involving patching or hooking the syscalls in the kernel & filesystem as you'd need to get in there at a very low level to stop this.
Another would be a PowerShell script that runs every so often and then modifies the file names based on regular expressions.
As Tiersten has stated, these are hacks, but are simpler than what Tiersten mentioned. But with the drawback of being limited to specific folders. -
Optionstiersten Member Posts: 4,505Why do you want to restrict the filenames anyway? You have some sort of auditing or backup process that barfs when it gets an unusual or long filename?
Restricting the path length is difficult anyway. Say you have 2 long nested directory trees. Each one individually is fine but somebody now drags 1 tree into the one. How do you handle that?RobertKaucher wrote: »As Tiersten has stated, these are hacks, but are simpler than what Tiersten mentioned. But with the drawback of being limited to specific folders. -
Optionsblargoe Member Posts: 4,174 ■■■■■■■■■□You might could cobble some rules together using File Server Resource Manager in Windows 2008. It's really more for file types/extensions, but you might be able to create rules for the file name... not sure.
That is an odd request you received.IT guy since 12/00
Recent: 11/2019 - RHCSA (RHEL 7); 2/2019 - Updated VCP to 6.5 (just a few days before VMware discontinued the re-cert policy...)
Working on: RHCE/Ansible
Future: Probably continued Red Hat Immersion, Possibly VCAP Design, or maybe a completely different path. Depends on job demands... -
OptionsSmallguy Member Posts: 597I assumed it was pretty much a no go
we just have a new person at a company we support who wants OT change the world and makes all kinds of suggestions...came form another company with hundred of people in IT and programming teams... infrastructure departments... admins who only do email or print servers etc not a company with a half dozen over run people
this was one of them
we countered with why not make a policy for file naming stating do not use special characters