ntfs

I get Invalid parameter with this icacls line

icacls d:\users\dptname\username /grant:W company-domain\username:(OI)(CI)(M) error says: invalid paramter "/grant:W" why? ...

Determine if a directory can be moved on NTFS

I have a directory that contains lots of files in a complex tree of sub-directories. If I try to move that directory into a another directory on the same partition, that operation could theoretically take constant time - a rename operation, basically. - as long as none of the files in the source directory are in use and there are no sec...

Add File Summary tab data in runtime in NTFS in WinXP SP3

Hello, stackoverflowers :) I have given up tryng to figure out the reason of this issue, but here is the story and hope you could give a tip... As I develop unique app ( http://code.google.com/p/sedev ) and therefore I need to polish it. I have to add File Summary ( very useful info in my opinion ) to any created files by the app, so I...

Getting Extra Information From WinAPI File Change Notifications

The MSDN has a pretty good example of getting notified when a file or directory is changed. However, I can't find any way to get extra information such as the user/machine name associated with the change notification. For example, I've setup a share X:\Foo from my machine. I would like to log the user/machine names that make changes t...

IIS 7.5/ASP.NET - Anonymous access to everything except one directory - how?

We're in the process of upgrading from IIS 6 and .NET 3.5 to IIS 7.5 (Windows Server 2008 R2 Enterprise) with the same application. I'm having trouble getting our previous IIS 6 setup to work correctly. Under IIS 6, I could set the website itself to use a specific domain user (e.g. ourdomain\webuser) for IIS itself. This controlled in...

NTFS Filesystem Time

I tested this on windows xp. If I do Create a file. Write to the file. Close the file.(Then, the file's LastWriteTime is changed) But if I do Create a file. Set LastFileTime of the file. Examine the time by calling GetFileTime (Then, the file's LastWriteTime is changed) Sleep 20 seconds. Write to the file. Sleep 20 seconds. Close ...

NTFS structure and error analysis

This may sound like a serverfault question, but it isn't. It is about data formats of NTFS. Here goes. I have a corrupt disk drive. It's flashes in RAID, but it doesn't matter. Various corruption modes occur occasionally on these disks. The resulting error, which I have at hand at the moment, is detectable by chkdsk. I need to know, fr...

How do you read the 128-bit NTFS FILE_ID for a directory and/or file?

So NTFS uses a 128-bit Guid to identify files and directories, you can view this information easily enough: C:\Temp>C:\Windows\System32\fsutil.exe objectid query . Object ID : ab3ffba83c67df118130e0cb4e9d4076 BirthVolume ID : ca38ec6abfe0ca4baa9b54a543fdd84f BirthObjectId ID : ab3ffba83c67df118130e0cb4e9d4076 Domain ID : ...

Blocking write locks with transacted NTFS

According to the MSDN documentation, transactional NTFS doesn't seem to allow one to block on opening a file for write - instead the open operation fails with ERROR_SHARING_VIOLATION. I'd like to block on writes instead - how can I do this? Ideally I'd like the following properties for the solution: Works over a network share (so no l...

Duplicate GetAccessRules, FileSystemAccessRule entries

Hi, I'm getting a duplicate FileSystemAccessRule from this code below: C:\inetpub\wwwroot\AspInfo\Account BUILTIN\IIS_IUSRS : Allow : ReadAndExecute, Synchronize BUILTIN\IIS_IUSRS : Allow : -1610612736 NT SERVICE\TrustedInstaller : Allow : FullControl NT SERVICE\TrustedInstaller : Allow : 268435456 and I can't work out what or why it ...

In NTFS Compressed Directory, How to read Files compressed and uncompressed size?

In our application, we are generating some large ASCII log files to an Windows NTFS compressed directory. My users want to know both the compressed and uncompressed size of the files on a status screen for the application. We are using Rad Studio 2010 C++ for this application. I found this nice recursive routine online to read the siz...

Linux: MySQL: how to use a mysql databases on a mounted NTFS as mysql database in linux?

hi, i wanna use databases in D:\xampp\mysql\data in my linux mysql without moving it. so i can work on them from both linux and windows here is what i did: # mount -t ntfs -o uid=mysql,gid=mysql,dmask=002,fmask=113 /dev/sda5 /media/public/ # cd /var/lib/mysql # ln /media/public/xampp/mysql/data/my_db -s # chown -R mysql:mysql /var/lib...

When do we should use a scatter/gather(vectored) IO?

Windows file system supports scatter/gather IO.(Of course, other platform does) But I don't know when do I use the IO mechanism. Could you explain me a proper case? And what benefit can we get from using the I/O mechanism?(Just a little IO request?) ...

Out of space on NTFS disk after a series of same-sized files creation/deletion

Hi all, I've ran into a really weird problem while working on a large project. I write a bunch of same-size files on a partition (tried both RAM disks and virtual disks created via diskmgmt.msc). When there is not enough free space to fit another file (as reported by GetDiskFreeSpaceExW), I delete one (only one) of the previously create...

how to extract files from a dd_rescue image

Hi , I have been able to create an image of a disk that had a lot of bad sectors . After few days of dd_rescue i eventually get almost all my data back. My partition is a ntfs filesystem . I have been able to mount the partition under linux ( via mount or loopdev ) but still wondering how to copy the valid files to another disk ( so sk...

Are Extended-Lenght Paths safe to use?

I just stumbled on this article on MSDN that says a path can be 259 characters + NUL termination, but if you prefix it with "\\?\" WinAPI allows you to use the maximum total path length of 32,767 characters. Eager to see it working I tried using that prefix from Explorer (On XP SP3) but it doesn't work at all (on any path). If you...

How to compare 2 volumes and list modified files?

I have 2 hard-disk volumes(one is a backup image of the other), I want to compare the volumes and list all the modified files, so that the user can select the ones he/she wants to roll-back. Currently I'm recursing through the new volume and comparing each file's time-stamps to the old volume's files (if they are int the old volume). Ob...

How to create a Junction Point using WinApi?

There is CreateHardLink function to create Hardlinks.(Since Win2000) And There is CreateSymbolicLink function since Vista has been released. But why isn't there a CreateJunction? How does mklink make a junction? And How do I write codes to make junction in my app? ...

how to set folder ACLs from C#

How can I automate the following manual steps in C#? Right click a folder in Windows Explorer; Properties -> Security -> Advanced -> Edit Un-tick "Include inheritable permissions from this object's parent" and click Remove. Click Add, choose a group and grant it Modify rights. I've found this article, which looks like exactly what i...

How to read the current machine NTFS settings?

Before inserting filestream data I'd like to check the following NTFS settings: 1) 8.3 naming status (this is disabled by using fsutil behavior set disable8dot3 1) 2) last access status (this is disabled by using fsutil behavior set disablelastaccess 1) 3) cluster size (this is set with format F: /FS:NTFS /V:MyFILESTREAMContainer /A:...