Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Synology Drive open files

  1. #1
    Join Date
    Jan 2015
    Beans
    18
    Distro
    Ubuntu

    Synology Drive open files

    Hi I have my Ubuntu working quite nicely but have a question about files on a shared hard drive. I can see the files on this drive but I cannot open them.
    I have attached a screenshot of the hard drive contents which are synched from a Synology NAS.
    I would be grateful for advice - the message I get when trying to open is 'Could not display - there is no application installed for symbolic link files'. The files are downloaded though.
    I am on Ubuntu 20.04.
    Attached Images Attached Images

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

    Re: Synology Drive open files

    Permissions?
    Text-only please. https://help.ubuntu.com/community/FilePermissions

  3. #3
    Join Date
    Jan 2015
    Beans
    18
    Distro
    Ubuntu

    Re: Synology Drive open files

    Yes thanks I am having a look at that. I am wondering if the Synology on demand might be part of the issue. I can see and use what must be the NAS network locations fine.
    Last edited by paullangdon678; February 15th, 2021 at 02:02 PM. Reason: Clarity

  4. #4
    Join Date
    Dec 2014
    Beans
    1,724

    Re: Synology Drive open files

    From the error message and the iconography in the image I believe the files you're trying to access are actually symbolic links to files which have been moved or deleted since those links were created. Or it could be a link pointing to files on a shared network location which isn't currently mounted.

    Holger

  5. #5
    Join Date
    Jan 2015
    Beans
    18
    Distro
    Ubuntu

    Question Re: Synology Drive open files

    Quote Originally Posted by Holger_Gehrke View Post
    From the error message and the iconography in the image I believe the files you're trying to access are actually symbolic links to files which have been moved or deleted since those links were created. Or it could be a link pointing to files on a shared network location which isn't currently mounted.

    Holger
    Yes sorry the delay in coming back to you - I have been working reading through an Ubuntu unleashed book to get a bit more up to speed. You are probably right as I can create files within a different folder and open them fine.

    Also have four network locations which all have Synology in their title and all appear to contain the same material in a folder called Drive, as I have on the Toshiba storage drive which is the one I expected to see and it set to synchronise with my Synology NAS.

    Other files can be opened on all locations and folders except the Synology Drive on on the Toshiba Drive (i.e. the one that is synched).

    A general explanation on my structure which I do not yet understand might be helpful but I think the main question I need an answer to is how do I mount the shared network location. The fact that network locations appear suggests they are mounted?

    I hope this makes sense - I am getting a little lost with this.
    Attached Images Attached Images
    Last edited by paullangdon678; March 4th, 2021 at 04:49 PM.

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

    Re: Synology Drive open files

    Don't use the GUI. GUIs lie.
    Use the CLI.

    If a file system local or remote is "mounted", then it will show up with the 'df' command. df -Th is very helpful.

    To see the permissions/options used in a mount, use the 'mount' command. No options. That will show all mounts with all the options.

    Foreign file systems are still required to have permissions even if they don't support native Unix permissions. A very common problem is that the permissions created during the mount of a foreign file system has the wrong permissions. It is not automatic. NTFS and Samba/CIFS are foreign.

    If you are mounting using NFS, then native file permissions are used. The link I provided in my first reply is a minimum level of knowledge needed to work with those. This isn't optional. Every file and every directory on any Unix system has permissions, owner, group, and perhaps xattrs and ACLs.

    If I assume you are using Samba/CIFS mounts with the NAS, then I'd do something like this:
    Code:
    $ df -Th 
    Filesystem                        Type  Size  Used Avail Use% Mounted on
    ....
    //172.22.22.14/K                  cifs   74G   18G   57G  24% /Data/K
    /Data/K is where I have a Windows system that shares some storage. I removed all the other mounted locations to keep the output clean here.

    To see the mount options for it:
    Code:
    $ mount |grep K
    //172.22.22.14/K on /Data/K type cifs (rw,relatime,vers=2.1,cache=strict,username=thefu,uid=1000,forceuid,gid=1000,forcegid,addr=172.22.22.14,file_mode=0664,dir_mode=0775,soft,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,bsize=1048576,echo_interval=60,actimeo=1)
    See the uid, gid, file_mode, dir_mode and username parts? Those are forcing specific Linux users with permissions with a Windows login (thefu) used.
    The 'grep K' is just a filter so 10 other mounts aren't cluttering up the output. 'K' is just a letter in the mount that I guessed would be unique to that mount. grep is a pattern matching program, 'K' in my use above. grep isn't necessary at all.

    If your Synology supports NFS, that would be my preference, since it is usually faster, and because it does support native Unix permissions. I like Unix permissions. But many people don't (why run Unix then???). Alas, Windows systems don't have an NFS server built-in - or at least mine do not.

    Can you do commands similar to mine above for your situation and post the output using code tags, please?
    After that is successful, we can look at the actual files or symbolic links that aren't working and where those things point. It is possible to have a link that can be accessed, but it might point to a directory or file that cannot be accessed due to permissions or as Holger_Gehrke said above, isn't mounted.

    Storage doesn't automatically get mounted in Linux, unless we tell the system to mount it, always.

  7. #7
    Join Date
    Jan 2015
    Beans
    18
    Distro
    Ubuntu

    Re: Synology Drive open files

    Ok thanks or the assistance.
    I have run commands with the results below. I should add that I have changed the setting on my Synology Drive Client so that On-Demand-Synch is off. This means that I can now access the Toshiba Drive sdc1 fine now and open files. Not sure if there is cure for this but not too fussed as I am not short of disk space at the moment.
    However I am not home and dry yet as I cannot set Synology Drive client to synchronise that drive does not appear. Nor can music apps see it (it is not offered as a location choice) other than Rythmbox which seems to have no problem.
    Sorry I might have missed something - not sure what you meant by 'using code tags'. I have probably included too much but better that than too little.
    Still working through Ubuntu unleashed...
    Code:
    psas@LianLi:~$ sudo df -Th
    Filesystem     Type     Size  Used Avail Use% Mounted on
    tmpfs          tmpfs    786M  4.0M  782M   1% /run
    /dev/nvme0n1p5 ext4      48G   39G  6.3G  87% /
    tmpfs          tmpfs    3.9G     0  3.9G   0% /dev/shm
    tmpfs          tmpfs    5.0M  4.0K  5.0M   1% /run/lock
    tmpfs          tmpfs    4.0M     0  4.0M   0% /sys/fs/cgroup
    /dev/nvme0n1p1 vfat      96M   33M   64M  35% /boot/efi
    tmpfs          tmpfs    786M  148K  786M   1% /run/user/1000
    /dev/sdc1      fuseblk  932G  170G  762G  19% /media/psas/STORAGE Tosh 1TB
    Code:
    
    psas@LianLi:~$ mount |grep sdc1
    /dev/sdc1 on /media/psas/STORAGE Tosh 1TB type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
    Last edited by paullangdon678; March 10th, 2021 at 10:33 AM. Reason: Use code tag

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

    Re: Synology Drive open files

    Code Tags: https://ubuntuforums.org/misc.php?do=bbcode#code
    Things that come from the terminal need to line up. Code Tags does that when posting here.

  9. #9
    Join Date
    Jan 2015
    Beans
    18
    Distro
    Ubuntu

    Re: Synology Drive open files

    Great thanks, So done.
    Puzzled though as the last line of output shows rw - I interpret that as sdc1 one should allow write and read.
    Folder permissions are rw on SDC1.

    I cannot save files to this drive from another drive. I get this when I try to do so:
    http://gofile.me/5zaWR/Kh0pOPOrE
    I can open on the drive, edit but cannot save files.

    The Toshiba drive is more visible now and music files can be played but cannot be edited.

    I can save to the location /homes for borisp. I assume what I am doing here is working directly on the NAS.

    Finally my Synology drive is formatted btfrs. The Toshiba drive sdc1 is NTFS. I have used btfrs on the NAS as this is needed for services I am using on the NAS.
    I cannot add images inline to this post as the paperclip is not working for me.
    Perhaps Linux is not for me
    Last edited by paullangdon678; March 10th, 2021 at 02:08 PM. Reason: add image

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

    Re: Synology Drive open files

    Quote Originally Posted by paullangdon678 View Post
    Great thanks, So done.
    Puzzled though as the last line of output shows rw - I interpret that as sdc1 one should allow write and read.
    Folder permissions are rw on SDC1.
    So - that isn't the entire story and df doesn't say anything about directory permissions. It only says stuff about mounts. The mount is rw. That is an important difference.
    Code:
    $ mount |grep sdc1
    /dev/sdc1 on /media/psas/STORAGE Tosh 1TB type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
    This tells us:
    • The label for this storage as spaces in is. That will be a hassle for the rest of the time. I'd fix that. No spaces in any labels, directories, filenames. Spaces just cause problems.
    • Appears that udisks2 did the mount and that this file system is NOT a native Linux file system. That's bad. I'd guess it is NTFS.
    • The owner and group are both root, which really isn't useful for most people.


    First, I'd remove all the data on the disk (make a backup), then format it into ext4 as the file system. This is native to linux and solves many issues you have now. I don't care how you format the partition to ext4. You can use mkfs or gparted. Doesn't matter. At the same time, I'd set the label so it doesn't have any spaces or punctuation characters. "Tosh_1tb" or something like that?

    Second, I'd use the fstab to mount the storage. You can use the LABEL= option.
    Code:
    LABEL=Tosh_1tb     /media/Tosh_1tb    ext4    noatime,nofail    0   2
    Spaces are the delimiter, so don't put any spaces where I haven't shown any. 1 or 20 spaces is fine. That doesn't matter.
    That line added to the bottom of the /etc/fstab file will do it. Use sudoedit /etc/fstab to edit the fstab (or any system config file). Other methods aren't as safe. Then run sudo mount -a and it should mount. At every reboot, it will be automatically mounted too. If you don't plan to leave it connected all the time, say something now. As that config line is now, it will complain loudly if the disk isn't connected.
    df -Th will check what is and isn't mounted.

    Third, we need to set the permissions and group correctly for your needs. NTFS doesn't support this, so it was always going to be a hassle with that file system. Native Linux file systems allow fine-grained control and changing of the permissions for each file/directory object. To start, make your userid the owner of everything.
    Code:
    sudo chown -R psas /media/Tosh_1tb
    That will be the last time you need to use sudo. You'll have full modification for everything on the partition.
    If it were me, I'd lock down the permissions a little more -
    Code:
    chmod -R 755 /media/Tosh_1tb
    Then you can copy back the files that were removed before formatting.

    I wouldn't use brtfs for a number of reasons. But it is your disk. Feel free if you want btrfs rather than ext4. I can't help with that.

    Code:
    psas@LianLi:~$ sudo df -Th
    Filesystem     Type     Size  Used Avail Use% Mounted on
    /dev/nvme0n1p5 ext4      48G   39G  6.3G  87% /
    /dev/nvme0n1p1 vfat      96M   33M   64M  35% /boot/efi
    /dev/sdc1      fuseblk  932G  170G  762G  19% /media/psas/STORAGE Tosh 1TB
    No need for sudo in that command. sudo abuse is a good way to break your system, though it didn't do any harm for that command.

Page 1 of 2 12 LastLast

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
  •