Cheapo NAS device - file date/time issue

For discussing Linux compatible (or not) devices

Moderators: ChrisThornett, LXF moderators

Cheapo NAS device - file date/time issue

Postby spottedcat » Sat Nov 11, 2006 5:49 pm

I've just bought myself this LAN HDD Enclosure from Maplins. It can function as both an SMP server and FTP server. As a (relatively) cheap and cheerful solution it's working quite well. Dead easy to access it from the Gnome desktop. It's Windows that's defeated me atm. :)

However, there's a problem - at least for me. When I copy files from my internal disc to the device, all the files get date-stamped with the date/time held in the device's internal clock which, fortunately, I can synchronise with a time server. This is a limitation for me because for many files I need to retain their last modified time rather than last copied time. I've noticed that some (all? most?) files I've downloaded from various websites get time/date stamped with current time rather than when they were created. So my question is: is this issue something to do with server protocols or could this be down to the firmware in the device? Or - does anyone know a way I can get around it?

There were a couple of little wrinkles getting the thing set up so if anyone is interested I could post what I discovered.

Edit: Oh, by the way. This from the above link:

OS support ME/2000/XP, MAC OS X, Linux


:wink:
spottedcat
LXF regular
 
Posts: 971
Joined: Mon Oct 31, 2005 3:14 pm
Location: UK

RE: Cheapo NAS device - file date/time issue

Postby Rhakios » Sat Nov 11, 2006 9:05 pm

Couldn't you maintain the file properties if you tarballed them up first?

I see ebuyer are still doing the NSLU2 at a reasonable price, amazon have put it up to over £60.
Bye, Rhakios
User avatar
Rhakios
Moderator
 
Posts: 7634
Joined: Wed Apr 06, 2005 11:18 pm
Location: Midlands, UK

Re: RE: Cheapo NAS device - file date/time issue

Postby spottedcat » Sun Nov 12, 2006 2:59 pm

Rhakios wrote:Couldn't you maintain the file properties if you tarballed them up first?


I'm sure I could, but I haven't worked out how I can unpack a tarball from within the server. If I double-click on a tarball in a Nautilus window displaying a fileserver folder I get a 'cannot open' error. And I haven't worked out how to cd into the fileserver filesystem to use the command line. It must be mounted somewhere, but where? Can anyone help? I'm pretty ignorant about networking generally.

Whether I drag and drop into a 'smb' or 'ftp' window I get the same date/time change. One way round is for me to take the HD out, put it in an usb-enclosure, copy all the files, and then put the HD back into the server. I only need to maintain the original date/time on my photo collection and a large number of word-processor documents which I may wish to access but not to modify.

Rhakios wrote:I see ebuyer are still doing the NSLU2 at a reasonable price, amazon have put it up to over £60.


Yes I was looking at that. The firmware is Linux-based and I've even found a website where you can get alternative Linux-based firmware for it. But because you need one or two usb hard-drive enclosures, it's not quite so tidy, and with the one I've bought, there's a facility in the firmware to sleep the hard disc after a period of inactivity. You can set anything from 5 to 60 minutes.

If anyone else is following this and was thinking of the Netgear SC101, be warned. Apparently, when they say system requirements, Windows, Windows or Windows, they mean it. It comes with a Windows driver so that the server is seen as drive X: :evil: and it cannot be used with Linux ar MacOS. Unless, that is, the information I found is out of date because I also read somewhere that Netgear were working on Linux and Mac drivers. And, if that's the case, more power to their elbow, say I. :)
spottedcat
LXF regular
 
Posts: 971
Joined: Mon Oct 31, 2005 3:14 pm
Location: UK

RE: Re: RE: Cheapo NAS device - file date/time issue

Postby shifty_ben » Sun Nov 12, 2006 3:34 pm

if you mount the Samba share then presumably you could use

touch -m -t [time] /path/to/file

not the cleanest way of doing it, and its obviously going to cause issues if you have a lot of files to go through. Not to mention the firmware may decide to change it back when you unmount the share.

What about copying the tarball across so that gets the modified time, then mount the share and unpack it with tar? again same issues as above with unmounting though
Need a New Signature
User avatar
shifty_ben
LXF regular
 
Posts: 1292
Joined: Tue Oct 04, 2005 9:56 am
Location: Ipswich

RE: Re: RE: Cheapo NAS device - file date/time issue

Postby spottedcat » Sun Nov 12, 2006 6:08 pm

Ah, Ben. Thanks for your interest, but I think you misunderstand me. At the moment I have all my personal files on a separate shared data partition on my main multiboot machine, and on various backups - and they all have the correct date/time stamps. I had intended to make the fileserver my principal working data store and to make archive backups from there. You know - time to work on a document - let me see, I think it's a laptop/Fedora day today.:wink: But when I copied from my present main data partition all the date/times got rewritten to current. That's not a problem atm because if I can work out how to get round this I can simply copy and rewrite them over from my present main data store again. I don't have to touch -t anything.

shifty_ben wrote:What about copying the tarball across so that gets the modified time, then mount the share and unpack it with tar?


That's what I want to do, except I want the current unmodified times, but I can't work out how to unpack the tarball once it's in the fileserver HD. What is the '/path/to/file' when it's in the server? :? Once I've got all the files into the fileserver with their original times preserved I'm quite happy if the time gets reset when I edit a file - that's what happens anyway - but I may still have a problem when archiving.

I'll probably end up putting the HD in an usb enclosure to get the original copying done - it's just a 5-minute screwdriver job - but I'd like to learn how to manipulate tarballs held in the server.
spottedcat
LXF regular
 
Posts: 971
Joined: Mon Oct 31, 2005 3:14 pm
Location: UK

RE: Re: RE: Cheapo NAS device - file date/time issue

Postby nelz » Sun Nov 12, 2006 6:08 pm

Are times corrupted when using FTP too? wget has an option to preserve timestamps.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8490
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Re: RE: Re: RE: Cheapo NAS device - file date/time issue

Postby spottedcat » Sun Nov 12, 2006 6:17 pm

nelz wrote:Are times corrupted when using FTP too? wget has an option to preserve timestamps.


Yes. Or rather uploading from the computer to the server using ftp and the gui changes the time. I hadn't thought of wget. :oops: Thanks for that. But I need to go host > server as well as server > host in order to get the archive onto the server uncorrupted in the first place. According to the FM, wget only retrieves files. I need a wgive command as well. :) Is there such a thing, or a switch for wget?

Edit: You've given me an idea, nelz. I was just dragging and dropping with nautilus windows. I'll try gFTP later and see what happens.
spottedcat
LXF regular
 
Posts: 971
Joined: Mon Oct 31, 2005 3:14 pm
Location: UK

RE: Re: RE: Re: RE: Cheapo NAS device - file date/time issue

Postby spottedcat » Sun Nov 12, 2006 7:39 pm

Ho hum, gFTP won't play ball. It connects OK but comes up with a 'cannot parse listing' error. It works OK with a little-used subdomain I have with my ISP, so I tried uploading a file to that and, sure enough, the date and time got changed to the time of transfer. At least I've learnt one thing - this date/time business is to do with network transfers and not a 'feature' of my fileserver device.

Perhaps the command line ftp has a switch to prevent this happening. Trouble is, I've never used the ftp command before. Time to get out the screwdriver I think.
spottedcat
LXF regular
 
Posts: 971
Joined: Mon Oct 31, 2005 3:14 pm
Location: UK

RE: Re: RE: Re: RE: Cheapo NAS device - file date/time issue

Postby nelz » Sun Nov 12, 2006 9:47 pm

You could try wput or ncftp. The latter is most likely to have the options you need.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8490
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

RE: Re: RE: Re: RE: Cheapo NAS device - file date/time issue

Postby spottedcat » Sun Nov 12, 2006 11:31 pm

Thanks, nelz. It's not that I'm unwilling to RTFM, it's just that often I don't know which FM to R. I'll read up on both.
spottedcat
LXF regular
 
Posts: 971
Joined: Mon Oct 31, 2005 3:14 pm
Location: UK

RE: Re: RE: Re: RE: Cheapo NAS device - file date/time issue

Postby nelz » Sun Nov 12, 2006 11:48 pm

Does the device support SSH or rsync?
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8490
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

RE: Re: RE: Re: RE: Cheapo NAS device - file date/time issue

Postby spottedcat » Mon Nov 13, 2006 9:27 am

Interesting question, nelz. I'd wondered about ssh, but as I've never had the need for it until now, it represented yet another rtfm job. :)

The 'documentation' that comes with the device is sparse - just a small instruction manual written in that strange dialect of English that results when you translate from the original Chinese via Serbo-Croat and Martian. It merely covers the various functions that confront you from the web-wased configuration interface - complete with the occasional error.

The device is not branded and nowhere states what the basic OS is underlying the firmware, but if I was a betting man I would put serious money on it being one of the Linux-based NAS firmwares that are floating about on the web. My priority is to reassure myself that I can get around this date/time nonsense so that I can use it as my main file repository from all my machines. You've given me several leads already. Then, perhaps, I'll read up on ssh and see if I can ssh into it.

Of course, if I was a real geek I'd be trying to hack the firmware or replace it with one of the OS ones. I found a website that is devoted entirely to doing just that on the Linksys device that Rhakios mentioned. I suppose everyone needs a hobby. :D

Thanks, as ever, for your help.
spottedcat
LXF regular
 
Posts: 971
Joined: Mon Oct 31, 2005 3:14 pm
Location: UK

RE: Re: RE: Re: RE: Cheapo NAS device - file date/time issue

Postby Rhakios » Mon Nov 13, 2006 7:29 pm

Well, as the NSLU2 used to be so cheap and I have a few external disk enclosures, I bought two slugs, one is unslung the other not. The trouble is that I never seem to have the time to play with the unslung one, though the other does get my weekly back-up sent to it.
Bye, Rhakios
User avatar
Rhakios
Moderator
 
Posts: 7634
Joined: Wed Apr 06, 2005 11:18 pm
Location: Midlands, UK

RE: Re: RE: Re: RE: Cheapo NAS device - file date/time issue

Postby spottedcat » Thu Nov 16, 2006 3:27 pm

Update:

The device doesn't support SSH - I can't connect - but I discovered that transferring files from one computer to another via SSH doesn't change the timestamp. Interesting.

I've tried uploading files using ftp, hsftp, tnftp, ncftp2 and wput, some of which have command options that control timestaming, but I couldn't get any of them to transfer files without changing the time/date. I was probably doing something wrong, but life is short so I got my screwdriver out, put the HD into an usb enclosure and uploaded my archive that way. Mission part 1 accomplished. 8)

For downloading: wget -N blahblah works nicely but then I noticed something odd. There were a handful of files with dates predating 2000. But when I browsed them using a Nautilus ftp window - the HD now back in the NAS device - their dates all showed 0100 hours on 1st January 1970. (It was a Thursday, by the way. :wink:) All post millenial-change dates were OK. So - I've encountered a millenium bug 6 years too late. :) And when I wgetted -N them, the times got changed to current. Weird.

Rhakios, if by chance you check up on this thread and read this, could you let me know what the Linksys device does with timestamps on transferred files? Ta. I'm not going to trust my device to my personal files just yet, but it's still going to be useful as a repository for downloaded stuff that I might want to access from anywhere in my network.
spottedcat
LXF regular
 
Posts: 971
Joined: Mon Oct 31, 2005 3:14 pm
Location: UK

RE: Re: RE: Re: RE: Cheapo NAS device - file date/time issue

Postby Rhakios » Fri Nov 17, 2006 4:56 pm

I'll have a look when I get home.



No, second thoughts, I'll have a look tomorrow afternoon, I'm socialising tonight (and recovering tomorrow morning).
Bye, Rhakios
User avatar
Rhakios
Moderator
 
Posts: 7634
Joined: Wed Apr 06, 2005 11:18 pm
Location: Midlands, UK

Next

Return to Hardware

Who is online

Users browsing this forum: No registered users and 1 guest