I am trying to access a USB HD attached to my open wrt router/SMB via windows or a file explorer in iOS.
Windows does not “see” the router
Within iOS I get a request for user password all the time. But the user pass I set don’t work. Same authentication request appears even if I set security = share
I think this has to do with permissions authorizations for the router to access the usb HD.
I saw you had written about it, but I am very new to all this and I don’t understand what needs to be done
Thanks a lot
Very clear
I had reinstalled fresh the routers firmware and formatted the usb drive with fat 32
I have not set up any user.
I can now access the usb drive from iOS and windows but I can’t write it from windows
I am now in the middle on implementing your suggestions above but the ones related to user.
I will report
Not sure what the mask values are. Where can I read about it. I have googled but not really understood.
Is it the same as the permission given for a drive/ directory?
Rgds
I have executed what you suggested, and I can access the usb and the new directory from iOS but the router does not appear in windows explorer as it did before
I have mapped the IP address of the router to windows explorer and I receive the message device detected but not answering
I was wondering whether i need to open the ports of the router if I am in the same network and because before doing the changes I could see the router and access it in windows
Now I can access to the usb drive attached to the router from windows, although I had to map the drive and from iOS, but I can only read , not write or delete
How can I change the permissions.?
I am posting the config files again
Thanks
here the output of the config updated. I can delete now but not write i set the mask and permissions to 0777 in order to have full access , as this is only for home use. however i still can not write from windows to the usb drive connected to the router
cat etc/samba/smb.conf
[global]
netbios name = GL-AR750S
display charset = UTF-8
interfaces = lo br-lan
server string = GL-AR750S-6d0
unix charset = UTF-8
workgroup = lan
browseable = yes
deadtime = 30
domain master = yes
encrypt passwords = true
enable core files = no
guest account = nobody
guest ok = yes
invalid users = root
local master = yes
load printers = no
map to guest = Bad User
max protocol = SMB2
min receivefile size = 16384
null passwords = yes
obey pam restrictions = yes
os level = 20
passdb backend = smbpasswd
preferred master = yes
printable = no
security = share
smb encrypt = disabled
smb passwd file = /etc/samba/smbpasswd
socket options = TCP_NODELAY IPTOS_LOWDELAY
syslog = 2
use sendfile = yes
writeable = yes
[homes]
comment = Home Directories
browsable = no
read only = no
create mode = 0750
[sda1]
path = /mnt/sda1/pelis
read only = no
guest ok = yes
create mask = 0777
directory mask = 0777
lsa -lsa /path/to/share
-ash: lsa: not found
i am not posting the password bit because i have not set up any user/password after i reinstalled the firmware
What I would need now is full read/write/execute permissions to the usb drive.
Plus to manage that the usb drive is visible in windows file explorer without mapping the unit (it has been suggested this can be a port issue with the router?)
Mounted file systems
Filesystem
Mount Point
Available
Used
Unmount
/dev/root
/rom
0.00 B / 9.00 MB
100% (9.00 MB)
tmpfs
/tmp
60.06 MB / 60.84 MB
1% (804.00 KB)
/dev/ubi0_1
/overlay
95.52 MB / 101.69 MB
1% (1.45 MB)
overlayfs:/overlay
/
95.52 MB / 101.69 MB
1% (1.45 MB)
tmpfs
/dev
512.00 KB / 512.00 KB
0% (0.00 B)
/dev/sda1
/mnt/sda1/pelis
26.81 GB / 28.88 GB
7% (2.07 GB)
Mount Points
Mount Points define at which point a memory device will be attached to the filesystem
Enabled
Device
Mount Point
Filesystem
Options
Root
Check
UUID: 1F82-8506 (not present)
/mnt/sda1/pelis
?
defaults
no
no
I think I vaguely remember someone else having this problem, but I can't find the thread unfortunately, from what I remember they had to change permission for the drive itself, rather than the files. So you might try hooking the drive directly to your comp and make sure you have full permissions on the drive itself.
#Folder must be owned by 'root' 777 or 'nobody' 770
#and have at least the permission noted
mkdir /mnt/disk1
chown nobody /mnt/disk1/
chmod -R 774 /mnt/disk1
@cbx200 Please don't post multiple times in a row... if you need to, edit your last post if no one has replied yet, or delete it and re-post with the additional information, as your multiple posts make it difficult to follow your progress due to discombobulation.
The mask values in the /etc/config/samba apply to newly created files and directories, not existing ones.
Execute permissions are only needed by shell scripts and programs, not text files, music, or video, and as such, should only be applied execute permissions when they're required.
As I mentioned above, your issues are permissions related.
The following is required for full functionality of Samba shares:
Users and groups need to be configured on the router, of which must match the name(s) of the Samba user(s)
Samba users must be configured (root should never be one of them)
A share directory must be created (cannot be the root of a partition) and Samba users & groups from #2 must own the directory and any sub-directories
Traffic must be allowed on ports 137, 138, 139, and 445 between server and client(s)
Client local domain should match that of the router (on Windows, this is the WorkGroup name)
Since the OpenWrt wikis do not appear to be helping you, and as I can't explain it better than I did above, google how to configure Samba on Ubuntu via command line, as most of the steps will be the same.
It doesn't matter if the disk has existing files directories...
Let's say your USB drive is sda1:
It has a nested directory [dir1] with files and subdirectories contained within it at /mnt/sda1/dir1. To make dir1 your network share, perform the following:
Change ownership of all files and directories contained within dir1 to the Samba user (user should have been added to /etc/passwd) and Samba user's group (user's group should have been added to /etc/group): chown <samba-user1>:<samba-user1-group> -R /mnt/sda1/dir1
If you have more than one Samba user, a Samba user group should also be added to /etc/group and the Samba users added to that group
Note that content within < > needs to be replaced with your custom content
Change permissions of all nested directories contained within dir1 to 775 find /mnt/sda1/dir1 -type d -print0 | xargs -0 chmod 775
Change permissions of all nested files contained within dir1 to 660 find /mnt/sda1/dir1 -type f -print0 | xargs -0 chmod 660
Provided you're utilizing your LAN, the ports are already open on the router, so you simply need to ensure the firewall on your clients isn't blocking the ports (note: majority of default firewall configs have these ports open)