I may have mistyped that line. Whenever usb is removed from router the mount point differs between sda1 and sda2 or vice-versa... I created directory mkdir then applied permissions... chmod -R 777 /mnt/sda1 or sdb2/dir_name...
suppose dir name hello1
mkdir hello1
before chmod drwxr-xr-x 2 root root 4096 Feb 26 10:59 hello1
after chmod
chmod -R 777 hello1 drwxr-xr-x 2 root root 4096 Feb 26 10:59 hello1
You need to determine your mount point directory e.g. /mnt/sda1 or /mnt/sdb1 or /mnt/sdxx
Importanty! the directory(s) have to exist prior to any USB drive mount.
cat /proc/mounts will advise you of the mount directory...
e.g. this output /dev/sdb1 /mnt/sda1 exfat tells you it's mounted to /mnt/sda1
confim the directory exists, in the above case ls -l /mnt/sda1
then apply the chmod commands to the proper mount point directory, in the above case chmod -R 777 /mnt/sda1
Thanks a lot guys... i think i fixed it somehow... i don't know what i did but the permissions are set now.
drwxrwxrwx 9 root root 4096 Jan 1 1970 sda1
I can access it using my created user/password with full RW permissions.
I think i may've messed around with mounting points. Don't know exactly what fixed it.
Thanks... I think the issue has been resolved (i think so) by using the root user for samba login on clients. Also about the permission not changing, it's due to my fat32 formatting, it's behavior is quite normal on linux platform. I think i am fine with current settings as they are. It would've been easy if i could just format it into ext2/3 but unfortunately i can't due to many reasons.
This will violate all Linux security principles, so use it on your own risk But if you are in a controlled environment where you manage in some other way who is accessing your network, this a solution until you find something smarter. At least do not allow samba access over the wan port.