DD-WRT:Jffs sharing in a Linux server

=Introduction= The purpose of this document is to explain how I finally succeded in mounting a samba folder from my Linux Server into my /jffs WRT54G folder. The idea is explained here but If you are a newbie in Linux [I am] you may find it difficult to reach.

My main problem was to obtain permission to write into the shared folder, so I will explain how I changed the file smb.conf as well as the full process.


 * Note: As I'm a newbie in Linux, someone should correct this wiki to improve security issues.

*Note: If you don't have a Linux server but a Windows server to do battle against the permission problem, you can create a EXT3 image file (the linux filesystem, permission friendly) to have on the windows machine or for example a nas drive with the FAT filesystem (that was my problem) and install a ext3 module and a loopback module on the WRT54G and then mount the file as /JFFS.

=Instructions=

Replace <....> text with your settings.

Linux SERVER
Create and user if you only have the root user: [Debian / Ubuntu]: enter 
 * 1) adduser
 * 2) passwd

Install samba if you don't have it: [Debian / Ubuntu]:
 * 1) apt-get install samba smbfs

Edit config file /etc/samba/smb.conf (in my case it worked adding this at the end of the file): [jffs] comment = JFFS mounting folder path =  read only = No     valid users = invalid users = root bin daemon nobody named sys tty disk mem kmem users

You should finally restart your computer for the changes to take effect or stop/start the samba service:
 * 1) /etc/init.d/samba stop
 * 2) /etc/init.d/samba start

In  create the  with these commands inside: umount /jffs/ smbmount ///jffs /jffs -o username= ,password=

/dev/hda5      /media/data     vfat    users,umask=000        0       0
 * Note: If  (mine is /media/data/jffs) is in a FAT32 partition, you should permit rw access to it within the /etc/fstab config file. This is how is mounted my FAT32 partition inside fstab (you should restart your computer if you change this file):

WRT54G Web Interface
Enable JFFS2 Support under Administration -> Management:

JFFS2 Configuration: JFFS2 enabled: X Enable  Disable Clean JFFS2:  X Enable   Disable

Enable Samba FS Automount under Administration -> Management:

SAMBA Configuration: SMBFS enabled: X Enable  Disable Share: ///jffs User: Password:  Startscript: 

Restart your WRT54G