I have a windows share at /mnt/data which contains everything (about 5tb of data) from my old (Thecus) NAS.
my problem is, that when i copied everything over, although the files all came over with their timestamps intact, all the folders were given a last modified timestamp of the time they were created on the freeNAS share.
the problem is, that I have a critical folder within the share which has about 1700 subfolders (all at the same level) sorted by "last modified" which is now completely messed up.
I've actually found the solution in the form of a powershell script which will change the last modified timestamp on each folder to the last modified timestamp of the newest file in the folder, which would be perfect, freeNAS won't give my local user account sufficient access to change the folder properties as for some reason and during the copy (or possibly afterwards) they have all (only the folder, not the files) been set as read only and i can' change them so i get "access denied" whenever i try and run the powershell script to fix the issue. :(
i'll put my hands up right now and confess that i don't have much of a clue about how the permissions work in freenas, but i have created a user account for myself called "chris" and i have added that account to the "wheel" group (as i saw the root account was in the same group) and added chris as the user owner and the wheel group as the group owner of the /mnt/data share and that gave me the permissions i needed to copy all the files from NAS to NAS initially, so i thought it was okay until i ran into this problem. :(
i'm not overly concerned about restricting access rights as the NAS is on a home network and it doesn't have any kind of remote access set up, so my main concern is giving my account sufficient access to change the folder timestamps with this powershell script, so if anyone can give me any help at all in doing that, i would be very grateful. :)
P.S. sorry for babbling, i do that a lot. :o
my problem is, that when i copied everything over, although the files all came over with their timestamps intact, all the folders were given a last modified timestamp of the time they were created on the freeNAS share.
the problem is, that I have a critical folder within the share which has about 1700 subfolders (all at the same level) sorted by "last modified" which is now completely messed up.
I've actually found the solution in the form of a powershell script which will change the last modified timestamp on each folder to the last modified timestamp of the newest file in the folder, which would be perfect, freeNAS won't give my local user account sufficient access to change the folder properties as for some reason and during the copy (or possibly afterwards) they have all (only the folder, not the files) been set as read only and i can' change them so i get "access denied" whenever i try and run the powershell script to fix the issue. :(
i'll put my hands up right now and confess that i don't have much of a clue about how the permissions work in freenas, but i have created a user account for myself called "chris" and i have added that account to the "wheel" group (as i saw the root account was in the same group) and added chris as the user owner and the wheel group as the group owner of the /mnt/data share and that gave me the permissions i needed to copy all the files from NAS to NAS initially, so i thought it was okay until i ran into this problem. :(
i'm not overly concerned about restricting access rights as the NAS is on a home network and it doesn't have any kind of remote access set up, so my main concern is giving my account sufficient access to change the folder timestamps with this powershell script, so if anyone can give me any help at all in doing that, i would be very grateful. :)
P.S. sorry for babbling, i do that a lot. :o