Jffs sharing in a Linux server
From DD-WRT Wiki
Revision as of 20:57, 3 March 2006 (edit) 80.167.216.157 (Talk) (→Introduction) ← Previous diff |
Revision as of 20:59, 3 March 2006 (edit) (undo) 80.167.216.157 (Talk) (→Introduction) Next diff → |
||
Line 6: | Line 6: | ||
*Note: As I'm a newbie in Linux, someone should correct this wiki to improve security issues. | *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 and install a ext3 module and a loopback module on the WWRT54G and then mount the file as /JFFS.'' | + | ''*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 WWRT54G and then mount the file as /JFFS.'' |
=Instructions= | =Instructions= |
Revision as of 20:59, 3 March 2006
Contents |
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 WWRT54G 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]:
#adduser <user> #passwd <user> enter <password_user>
Install samba if you don't have it:
[Debian / Ubuntu]:
#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 = <your_jffs_path_in_the_server> read only = No valid users = <user> 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:
#/etc/init.d/samba stop #/etc/init.d/samba start
In <your_jffs_path_in_the_server> create the <script_file> with these commands inside:
umount /jffs/ smbmount //<IP.SE.RV.ER>/jffs /jffs -o username=<user>,password=<password_user>
- Note: If <your_jffs_path_in_the_server> (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):
/dev/hda5 /media/data vfat users,umask=000 0 0
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: //<IP.SE.RV.ER>/jffs User: <user> Password: <password_user> Startscript: <script_file>
Restart your WRT54G