Page 3 of 3 FirstFirst 123
Results 21 to 29 of 29

Thread: Can't Share a Ubuntu Folder with Windows 10

  1. #21
    Join Date
    Jun 2022
    Location
    South Florida USA
    Beans
    24
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Can't Share a Ubuntu Folder with Windows 10

    Quote Originally Posted by Morbius1 View Post
    You have no samba shares defined in smb.conf.

    If you did create any they must be samba usershares. So post the output of this command:
    Code:
    net usershare info --long
    THANKS IN ADVANCE.. Here's the info you requested..

    FYI: The user is "rdp2" and the shared folders are "Documents_home" , "Documents"
    I did as you suggested "sudo smbpasswd -a rdp2"

    OK, Here's what testparm produced. Is all "Greek" to me LoL..

    rdp1@server1
    :~$ testparm -s
    Load smb config files from /etc/samba/smb.conf
    Loaded services file OK.
    Weak crypto is allowed

    Server role: ROLE_STANDALONE

    # Global parameters
    [global]
    log file = /var/log/samba/log.%m
    logging = file
    map to guest = Bad User
    max log size = 1000
    obey pam restrictions = Yes
    pam password change = Yes
    panic action = /usr/share/samba/panic-action %d
    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
    passwd program = /usr/bin/passwd %u
    server role = standalone server
    server string = %h server (Samba, Ubuntu)
    unix password sync = Yes
    usershare allow guests = Yes
    idmap config * : backend = tdb


    [printers]
    browseable = No
    comment = All Printers
    create mask = 0700
    path = /var/spool/samba
    printable = Yes


    [print$]
    comment = Printer Drivers
    path = /var/lib/samba/printers

  2. #22
    Join Date
    Jun 2022
    Location
    South Florida USA
    Beans
    24
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Can't Share a Ubuntu Folder with Windows 10

    Quote Originally Posted by ActionParsnip View Post
    Did you run:
    Code:
    sudo apt update
    sudo apt -y install samba
    YES Thank You.. Samba is installed, But still not working..

  3. #23
    Join Date
    Jun 2022
    Location
    South Florida USA
    Beans
    24
    Distro
    Ubuntu 22.04 Jammy Jellyfish

  4. #24
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Can't Share a Ubuntu Folder with Windows 10

    There are 2 methods to mount storage. They are NOT the same.
    A "real mount" (my term, not generally used) is the method were we put mount information into system files. This allows full control and is normally performed via the /etc/fstab file entries. 1 line per mounted file system. autofs can also be used to achieve similar results while still being a "real mount". These are mounts that happen by the OS regardless of what a user does (unless the settings for the specific mount say to wait for a user to cause the mount).

    Then there is the GUI method provided by any number of file managers. These typically use some software from Gnome and don't touch the fstab. These are temporary mounts and always require a user to point-n-click. This means that anything dependent on a mount being available has to wait until some user manually causes the fake-mount to occur. Additionally, these fake-mounts are typically 20-30% slower.

    In short, use real mounts whenever something is important. Use fake mounts purely for convenience, understanding the limitations.

    BTW, unless a physical device will be directly connected to a Windows computer, it is best to use a native Linux file system, not NTFS, exFAT, or FAT32. Windows people seldom know much about file systems. There are many (perhaps too many) available in Linux. The main reason to use Linux file systems is for their native permissions support. Many tools need that and expect it. The Windows file system can be tricked into supporting those things, slightly, through manual mount options. Regardless, chown and chmod will never work with NTFS, exFAT, or FAT32 file systems. Of course, the settings are for all files inside the file system, since this is a trick. For storage that will be shared over a network, there it ZERO reason to leave it as NTFS.

    Wikipedia has a few articles which list file system features. It is easily found. There is a table. The overview is the use ext4 on SSD or HDD partitions unless you have a specific need for some other file system. For slower flash storage, Linux has f2fs, which is sorta like exFAT in the purpose, but not as widely supported. f2fs - "flash friendly file system". Part of that friendliness is that it is not journaled to reduce writes. That's good and bad. All modern file systems use journals to limit corruption. It is a good thing. NTFS is journaled, ext3/4, ZFS, btrfs, xfs, which are the most popular file systems are all journaled. There are more. Journaling is good, for non-flash storage media where we don't worry about write count limits.

    If you'd like help setting up real mounts, ask. Post the output from these 2 commands:
    Code:
    sudo fdisk -l
    lsblk -e 7 -o name,size,type,fstype,mountpoint,uuid
    along with where you'd like each to be mounted. Adding 3 lines to the fstab is all that is needed and running 1 command, 1 time. After that point, those file systems will be mounted at boot.

  5. #25
    Join Date
    Jun 2022
    Location
    South Florida USA
    Beans
    24
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Can't Share a Ubuntu Folder with Windows 10

    Quote Originally Posted by TheFu View Post
    There are 2 methods to mount storage. They are NOT the same.

    If you'd like help setting up real mounts, ask. Post the output from these 2 commands:
    Code:
    sudo fdisk -l
    lsblk -e 7 -o name,size,type,fstype,mountpoint,uuid
    along with where you'd like each to be mounted. Adding 3 lines to the fstab is all that is needed and running 1 command, 1 time. After that point, those file systems will be mounted at boot.
    Thank you here's the resuts you requested. Also read my other notes below to see more.

    rdp2@server1:~$ lsblk -e 7 -o name,size,type,fstype,mountpoint,uuid

    NAME SIZE TYPE FSTYPE MOUNTPOINT UUID
    sda 111.8G disk
    ├─sda1 1M part
    ├─sda2 513M part vfat /boot/efi EB0D-0393
    └─sda3 111.3G part ext4 / f0943d0e-34c9-4962-a4d5-af17124d2c9d
    sdb 931.5G disk
    └─sdb1 931.5G part vfat /media/rdp2/WD1TBHardDr FACB-0886
    sdc 74.5G disk
    ├─sdc1 74.5G part ntfs /media/rdp1/80GB-Sata 60E616DD5EBAFAD0
    └─sdc2 1023.5K part
    sdd 1.8T disk ntfs /media/rdp2/2 TB Hard Drive 7A6A423D11A9D1D8
    I found that the Mount/Unmount via the GUI File Manager is only Temporary, and if I restart the Ubuntu Server the Shared folder no longer works, so I have to simply unmount and the remount if that makes sense?

    So I am missing something, but delighted I'm making headway here, thanks to all your help.


    When I was on the desktop of the Ubuntu server via XRDP, I realized I could no longer access the drives shown in the Files App..

    So I right clicked the folder to "UnMount" the one drive, then when I clicked the folder again it remounted it and I had access to it.
    Then I created a new folder named "WD1TBShare" and then right click it to bring up the GUI menu to enable Local Network Share.

    Bingo !!! I went to my Windows 10 PC and all the shared folder on the Ubuntu Server were now fully accessible with the Log in credentials.
    So all 4 drives are fully accessible.
    Now can someone explain why if I unmounted the Hard Drives and the Mounted them they now worked.


  6. #26
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Can't Share a Ubuntu Folder with Windows 10

    Please edit the post above and replace the "quote-tags" with "code-tags", so the columns line up correctly. I'll wait for that fix. How? Https://ubuntuforums.org/misc.php?do=bbcode#code explains.

    I do see that the external storage isn't using native Linux file systems. That isn't good. It means you'll never be able to use chmod or chown on the files, so getting the permissions correct will never work except for dumb data files that you want everyone on the machines to have access.

  7. #27
    Join Date
    Jun 2022
    Location
    South Florida USA
    Beans
    24
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Can't Share a Ubuntu Folder with Windows 10

    Quote Originally Posted by TheFu View Post
    Please edit the post above and replace the "quote-tags" with "code-tags", so the columns line up correctly. I'll wait for that fix. How? Https://ubuntuforums.org/misc.php?do=bbcode#code explains.

    I do see that the external storage isn't using native Linux file systems. That isn't good. It means you'll never be able to use chmod or chown on the files, so getting the permissions correct will never work except for dumb data files that you want everyone on the machines to have access.
    This code seems to be working. However I noticed if I reboot, the shares do not stay. Once I Unmount & ReMount by clicking the drive in the GUI it works again.
    On testing in my house, I found that everything was accessible on Windows, and even on my TV's using android streaming box
    I was also reading some one different formats. I just need it to be compatible with Windows, Linux, Android..

    Thank You so very much for your assistance, and patients.

    I think this is what you want ?

    Code:
    rdp2@server1:~$ lsblk -e 7 -o name,size,type,fstype,mountpoint,uuid
    NAME      SIZE TYPE FSTYPE MOUNTPOINT                  UUID
    sda     111.8G disk                                    
    ├─sda1      1M part                                    
    ├─sda2    513M part vfat   /boot/efi                   EB0D-0393
    └─sda3  111.3G part ext4   /                           f0943d0e-34c9-4962-a4d5-af17124d2c9d
    sdb     931.5G disk                                    
    └─sdb1  931.5G part vfat   /media/rdp2/WD1TBHardDr     FACB-0886
    sdc      74.5G disk                                    
    ├─sdc1   74.5G part ntfs   /media/rdp1/80GB-Sata       60E616DD5EBAFAD0
    └─sdc2 1023.5K part                                    
    sdd       1.8T disk ntfs   /media/rdp2/2 TB Hard Drive 7A6A423D11A9D1D8
    Last edited by pcman51; August 1st, 2022 at 07:39 PM.

  8. #28
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Can't Share a Ubuntu Folder with Windows 10

    Yes, code tags make terminal output have the correct columns. Much easier to read.

    And where do you want each to be mounted? They can be placed anywhere, though I'd strongly recommend against using anywhere under /home/ or /media/ ... those places can cause other issues, which are best avoided. A mount point is what I'm asking for. This is an empty directory for each file system to be mounted.

    I use
    /d/D1
    /d/D2
    /d/D3
    /TV
    /Data/

    but it is possible to mount anywhere that you need storage. For example, I also mount specific file systems to
    Code:
    Filesystem                                  Type  Size  Used Avail Use% Mounted on
    /dev/mapper/istar--8TB--B-jellyfin_varlib   ext4   89G  6.8G   77G   9% /var/lib/jellyfin
    /dev/mapper/istar--8TB--B-plex_varlib       ext4   89G   40G   44G  48% /var/lib/plexmediaserver
    because those specific locations needed much more storage than I want to allocate to a typical /var/ file system.

    Is that helpful?

    So assuming I can't talk you into reformatting from NTFS to a useful file system, like ext4, You'll want a line like this for the 80G SATA:
    Code:
    UUID=60E616DD5EBAFAD0   /d/80G-Sata  ntfs  windows_names,nodev,nosuid,noatime,async,big_writes,timeout=2,uid=1000,gid=1000,fmask=0002,dmask=0002      0    0
    I assume you want the username with uid of 1000 and gid of 1000 to be the owner. If not, change those numbers to match the username/groupname (name or number is fine). The trailing last two zeros are important. They control whether fsck is attempted, what order and if it should be parallelized. NTFS cannot be fsck'd on Linux. The fmask and dmask are about file and directory permissions for every file in the file system. These options are kludges for non-Linux file systems and far from ideal.

    You'll gonna have issues with sdd. because is doesn't have a partition table. This is against standard best practices and many data recovery tools will not work at all if there isn't a partition table. You really, really, should fix that.

    Having spaces in the LABEL will cause hassles. While you can do it, just always quote it for any uses, it will be a hassle. If those mount points shown above are caused by the partition LABEL, instead of mounting by UUID, you can mount using the unique LABEL. It must be unique.
    Code:
    LABEL=80GB-Sata  /mount/point  fs-type   mount options    0  0
    Is how that works. I prefer mounting by label if it isn't an LVM-LV file system. Labels have better meaning for humans than useless device names or UUIDs.

    To quote a LABEL that has spaces,
    Code:
    LABEL="2 TB Hard Drive"  /mount/point  fs-type   mount options    0  0
    I'm assuming the gvfs mounts (GUI point-n-click mounting) has decided the mount location based on the LABEL. That is pretty common.

    Inside the fstab file, there is usually a header that has the fields explained. There are 6 fields. Spaces are the default separator, so each field cannot have spaces ... especially the options. 1 line for each mount. There's no wrapping allowed.

    To edit nearly all system files with just the sudoers and passwd file as exceptions, use the sudoedit command.
    Code:
    $ sudoedit /etc/fstab
    and make the changes like I've shown. vfat has slightly different options. vfat can apply to fat32, fat12 and a few other file systems. I don't have any exFAT storage here (personal political statement on my part), so I don't know if vfat applies to exfat file systems too.

    Since you've posted the info for / (111.3G), I'd add that / really shouldn't be so large. About 40G is the largest that should be setup for the / partition on an expertly configured system. Storage allocations are mainly about future needs, security settings, backups, recovery, and OS upgrades. The best practice is to have different file systems for logs, the OS, and user files ... that means at least 3 or 4 partitions are needed on most Linux systems. But people are lazy and that includes Canonical.

    Hope this is helpful.
    Also, with the options I've provided, you'll want to ensure the storage is connected and powered before booting the OS. The timeout should make the boot continue if they aren't, but samba won't like that you are trying to share non-existent storage.

  9. #29
    Join Date
    Jun 2022
    Location
    South Florida USA
    Beans
    24
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Can't Share a Ubuntu Folder with Windows 10

    I am truly thankful for your time and patients with me.

    I'll have more time to digest all you posted out later today or tomorrow.
    But just as the "Code Tags" took me like an hour, as I didn't fully understand how that worked. LoL

    I'm still in a learning stage here on how the server will be setup.
    * The 80GB HD will likely go away as it was only for testing, and a new 4TB drive will be added.

    What I vision so far is this.
    1. the 120GB SSD will have nothing else on it but the OS and Applications like, XRDP, Cockpit, and other apps I want to explore in the future.
    2. Drive 2 will be the 1TB HD
    3. Drive 3 will be the 2TB HD
    4. Drive 4 will be a 4GB HD that I just purchased.
    5. I will likely attach (on and off) several USB external Hard Drives mainly as single backup of the OS and other critical data, but not used after unless needed.

    BTW: I figured out how to have the server go to "Standby" after a set time of none use, thus saving power.
    * I'm now able to fully access the Server remotely (Locally), so now a headless server.
    * XRDP works excellent and I'll be using up to 3ea Thin Clients using RDP, including a couple android devices.
    * Cockpit is another nice way to access the server. I know there are others, but for now very nice.
    * I'm using a WOL (Wake on Lan) apps on my Cell Phone, PC, even TV, when I need to Wake up the Server.
    * Not sure how or why yet, but several Folders are now fully accessible by my various Media devices, and secure by User/PW.

    ** My Next step is to have the server make daily backup from one drive to another. I think I'll be fine when that time comes.

    In closing again thanks, I'll reply in detail once I've digested all you've share here. Thank Again

Page 3 of 3 FirstFirst 123

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •