DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-01-19 00:46:05

lewishan
Member
Registered: 2007-11-15
Posts: 6

Windows Backup Doesn't reset archive bit

Hi,
I'm using Windows backup with my DNS-323 and I've noticed that the Normal backup isn't resetting the Archive bit and thus I can't use differential or incremental backups effectively.

Is there a security setting on the DNS-323 that is causing this?

Daniel.

Offline

 

#2 2008-01-19 01:11:25

lewishan
Member
Registered: 2007-11-15
Posts: 6

Re: Windows Backup Doesn't reset archive bit

I just read from an earlier topic that this is a known issue and that D-Link have indicated this will be fixed in a new firware release.
Can anyone confirm if this is correct and if so, what work-arounds are people using?

Thanks,
Daniel

Offline

 

#3 2008-01-19 01:27:41

fordem
Member
Registered: 2007-01-26
Posts: 1938

Re: Windows Backup Doesn't reset archive bit

Are you backing up TO the DNS-323 or backing up the DNS-323 itself?

Offline

 

#4 2008-01-19 01:35:37

lewishan
Member
Registered: 2007-11-15
Posts: 6

Re: Windows Backup Doesn't reset archive bit

I'm backing up the DNS-323 to a local hard drive.

Offline

 

#5 2008-01-21 10:49:03

Thiam
Member
Registered: 2007-06-18
Posts: 43

Re: Windows Backup Doesn't reset archive bit

The version 1.4 UNofficial builds have a 'Map Archive' setting on the Network Access page.
This makes Samba map the Windows Archive flag to a Unix execution flag.
I found the information about the setting on
http://www.oreilly.com/catalog/samba/ch … 05_03.html


Thiam

Offline

 

#6 2008-01-21 11:45:54

lewishan
Member
Registered: 2007-11-15
Posts: 6

Re: Windows Backup Doesn't reset archive bit

So if I understand you correctly, if I upgrade to version 1.4 I should overcome the backup issues with the archive bit?

Offline

 

#7 2008-01-22 13:03:10

Thiam
Member
Registered: 2007-06-18
Posts: 43

Re: Windows Backup Doesn't reset archive bit

I think there's a fair chance, yes.
I'm running 1.4b82 myself, and it solved a lot of problems with the DNS-323 as a backup target for Backup Exec.
However, the current 1.4 builds are NOT offcial builds. Backup before you proceed.
I did a full format after upgrading from 1.3 to 1.4b82.

Thiam

Offline

 

#8 2008-03-03 07:47:28

lewishan
Member
Registered: 2007-11-15
Posts: 6

Re: Windows Backup Doesn't reset archive bit

I recently downloaded the firmware from the DLink site in the US and upgraded the unit which is now running firmware v1.04 dated 01/10/2008.

After I updated the firmware I reformatted the drive (I'm using 1 single disk with a standard format).

I then tested the backup but still find that differential backups won't work as the Archive bit remains on and all of the files continue to be backed up, as aposed to just the changed files.

Is anyone else experiencing this problem and is there a fix?

Thanks,
Daniel.

Offline

 

#9 2008-03-03 11:01:00

sjmac
Member
Registered: 2008-01-21
Posts: 222

Re: Windows Backup Doesn't reset archive bit

The archive bit seems broken for me too. I can't set or clear it using the attrib command via a UNC path or a mapped drive letter:

In my DNS323 web UI, in the Advanced tab (at the top of the web page) > Network Access section (left side of web page) I checked that the "Map archive" options was set to "yes" for the Volume_1 share.

Then I open a command prompt and tried to set or unset the archive bit:

Code:

Microsoft Windows [Version 6.0.6000]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\>attrib /?
Displays or changes file attributes.

ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H] [+I | -I]
       [drive:][path][filename] [/S [/D] [/L]]

  +   Sets an attribute.
  -   Clears an attribute.
  R   Read-only file attribute.
  A   Archive file attribute.
  S   System file attribute.
  H   Hidden file attribute.
  I   Not content indexed file attribute.
  [drive:][path][filename]
      Specifies a file or files for attrib to process.
  /S  Processes matching files in the current folder
      and all subfolders.
  /D  Processes folders as well.
  /L  Work on the attributes of the Symbolic Link versus
      the target of the Symbolic Link


C:\>echo "Some text" >> \\nas1\Volume_1\test.txt

C:\>dir \\nas1\Volume_1\test.txt
 Volume in drive \\nas1\Volume_1 is Volume_1
 Volume Serial Number is 00E8-07A0

 Directory of \\nas1\Volume_1

03/03/2008  08:16                14 test.txt
               1 File(s)             14 bytes
               0 Dir(s)  396,297,801,728 bytes free

C:\>attrib \\nas1\Volume_1\test.txt
A            \\nas1\Volume_1\test.txt

C:\>attrib -A \\nas1\Volume_1\test.txt

C:\>attrib \\nas1\Volume_1\test.txt
A            \\nas1\Volume_1\test.txt

C:\>attrib \\nas1\Volume_1\test.txt +A

C:\>attrib \\nas1\Volume_1\test.txt
A            \\nas1\Volume_1\test.txt

C:\>attrib \\nas1\Volume_1\test.txt -A

C:\>attrib \\nas1\Volume_1\test.txt
A            \\nas1\Volume_1\test.txt

C:\>net use /?
The syntax of this command is:

NET USE
[devicename | *] [\\computername\sharename[\volume] [password | *]]
        [/USER:[domainname\]username]
        [/USER:[dotted domain name\]username]
        [/USER:[username@dotted domain name]
        [/SMARTCARD]
        [/SAVECRED]
        [[/DELETE] | [/PERSISTENT:{YES | NO}]]

NET USE {devicename | *} [password | *] /HOME

NET USE [/PERSISTENT:{YES | NO}]


C:\>net use p: \\nas1\Volume_1
The command completed successfully.

C:\>p:

P:\>attrib
A            P:\fun_plug
A            P:\starttwonky.sh
             P:\disks.txt
A            P:\disksa.txt
A            P:\e2fsck.txt
A            P:\test.txt

P:\>attrib -A test.txt

P:\>attrib
A            P:\fun_plug
A            P:\starttwonky.sh
             P:\disks.txt
A            P:\disksa.txt
A            P:\e2fsck.txt
A            P:\test.txt

P:\>c:

C:\>net use /delete p:
p: was deleted successfully.

Or maybe we just don't understand what it's supposed to do ;-)

That's all with the 1.04 firmware (1.04b84).

Last edited by sjmac (2008-03-03 11:02:51)

Offline

 

#10 2008-03-03 14:11:34

fordem
Member
Registered: 2007-01-26
Posts: 1938

Re: Windows Backup Doesn't reset archive bit

Based on my tests, I would agree that the archive bit still does not work (as expected by MS DOS/Windows) in fw 1.04

Offline

 

#11 2008-03-03 20:00:42

uyuni
Member
From: Denmark
Registered: 2007-12-29
Posts: 31

Re: Windows Backup Doesn't reset archive bit

I see same problem. It is because smb.conf contains the line

  force create mode = 0777

Delete that and it should work. And after the next reboot it is gone again :-(
This is why I have a sambafix.sh file in the funplug.d/start directory. It gets executed at each boot and it contains the following:

# Restart Samba with my configuration
echo "Executing $0" >> ${MYLOGFILE}
if [ -z "${MYSYS}" ]; then
    echo "ERROR:  MYSYS environment variable not defined in $0" >> ${MYLOGFILE}
else
    cp /mnt/Volume_1/etc/samba/smb.conf /etc/samba/smb.conf
    echo "Replaced smb.conf" >> ${MYLOGFILE}
fi
smb restart

MYLOGFILE is defined in the funplug script but you don't really need that: Only the 'cp' and the 'smb restart' commands are important. So:
1. Copy the original /etc/samba/smb.conf somewhere (e.g. such as /mnt/Volume_1/etc/samba/smb.conf)and edit it to your liking
2. Create a /mnt/Volume_1/funplug.d/start/sambafix.sh file
3. Reboot

Hope that helps


D-Link DNS-323 firmware 1.08 + Samsung HD203WI + Samsung HD103UJ + ffp-0.5 + addons

Offline

 

#12 2008-03-05 19:57:22

sjmac
Member
Registered: 2008-01-21
Posts: 222

Re: Windows Backup Doesn't reset archive bit

Do you know any reasons someone might want to keep the "force create mode = 0777" behaviour?

Otherwise that little snippet probably deserves to get pasted in to wiki, maybe in the better samba wiki page:
http://dns323.kood.org/howto:bettersamba

(BTW, I've not tested your change myself - the backup programs that I use don't use the archive bit ... )

Offline

 

#13 2008-03-05 22:16:08

uyuni
Member
From: Denmark
Registered: 2007-12-29
Posts: 31

Re: Windows Backup Doesn't reset archive bit

No, I have no idea of why anyone would use force create 0777.

Anyway, I added the tip to the page you suggested (thanks for the suggestion):
http://dns323.kood.org/howto:bettersamb … e_bit_work


D-Link DNS-323 firmware 1.08 + Samsung HD203WI + Samsung HD103UJ + ffp-0.5 + addons

Offline

 

#14 2008-03-05 23:33:43

mig
Member
From: Seattle, WA
Registered: 2006-12-21
Posts: 532

Re: Windows Backup Doesn't reset archive bit

uyuni - how does "force create mode = 0770' (in the wiki)  modify the behavior of the archive bit?

http://www.oreilly.com/catalog/samba/ch … ch05-56404

shows the windows archive bit is stored in the UNIX owner's execute bit.

Last edited by mig (2008-03-05 23:34:59)


DNS-323 • 2x Seagate Barracuda ES 7200.10 ST3250620NS 250GB SATAII (3.0Gb/s) 7200RPM 16MB • RAID1 • FW1.03 • ext2 
Fonz's v0.3 fun_plug http://www.inreto.de/dns323/fun-plug

Offline

 

#15 2008-03-06 22:56:02

uyuni
Member
From: Denmark
Registered: 2007-12-29
Posts: 31

Re: Windows Backup Doesn't reset archive bit

Mig, you are right. Thanks for detecting this. I have updated the Wiki with the simple solution - just deleting the line from smb.conf.


D-Link DNS-323 firmware 1.08 + Samsung HD203WI + Samsung HD103UJ + ffp-0.5 + addons

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB