External hdd permission?

hi to all
i’ve one question about rasberry with osmc os; i try to send my video under sftp with filezilla
directly to hard disk but always failed , i’m only able to send to HOME osmc
how to change permission or something to let me send my files directly to hard disk ?
if it is impossible to do how to transfering file from home to hard disk ?

Your user osmc needs write permission to the target directory where you want to upload the file to.

Please, specify the full qualified path where to place the file and from each single directory of the path the out put of “ls -ld”.

Example:
path is /media/myHDD/blah

we need

  • sudo ls -ld /media
  • sudo ls -ld /media/myHDD
  • sudo ls -ld /media/myHDD/blah

Normally it should be sufficient to give /media/myHDD/blah full permissions by sudo chmod 777 /media/myHDD/blahor change the ownership by sudo chown osmc:osmc /media/myHDD/bla.

thx for reply
there is result
login as: osmc
osmc@192.168.1.4’s password:

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Dec 17 18:40:07 2017 from 192.168.1.2
osmc@osmc:~$ sudo ls -ld /media
drwxr-xr-x 3 root root 4096 Jan 1 1970 /media
osmc@osmc:~$ sudo ls -ld /media/BE02395B02391A3B
drwxrwxrwx 1 osmc osmc 4096 Dec 10 17:34 /media/BE02395B02391A3B
osmc@osmc:~$ sudo ls -ld /media/BE02395B02391A3B/FILMS HD
ls: cannot access /media/BE02395B02391A3B/FILMS: No such file or directory
ls: cannot access HD: No such file or directory
osmc@osmc:~$ login as: osmc
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Dec 17 18:40:07 2017 from 192.168.1.2
osmc@osmc:~$ sudo ls -ld /media
drwxr-xr-x 3 root root 4096 Jan 1 1970 /media
osmc@osmc:~$ sudo ls -ld /media/BE02395B02391A3B
drwxrwxrwx 1 osmc osmc 4096 Dec 10 17:34 /media/BE02395B02391A3B
osmc@osmc:~$ sudo ls -ld /media/BE02395B02391A3B/FILMS HD
ls: cannot access /media/BE02395B02391A3B/FILMS: No such file or directory
ls: cannot access HD: No such file or directory
osmc@osmc:~$

If there is a blank in a directory name, surround the path with apostrophes:

sudo ls -ld '/media/BE02395B02391A3B/FILMS HD'

still no permission !!

login as: osmc
osmc@192.168.1.4’s password:

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Dec 17 19:16:30 2017 from 192.168.1.2
osmc@osmc:~$ sudo ls -ld ‘/media/BE02395B02391A3B/FILMS HD’
drwxrwxrwx 1 osmc osmc 262144 Dec 17 13:08 /media/BE02395B02391A3B/FILMS HD
osmc@osmc:~$

So, for the actual Debian Stretch OSMC upgrade this is all ok but perhaps your OSMC version behaves different, please change the permissions of the parent directory:

sudo chmod 777 /media

If that doesn’t help others are welcome to support you. I think the current sshd_config is then from interest, so

sudo cat /etc/ssh/sshd_config | paste-log

and present the given URL.

hi there is the link for sshd config
https://paste.osmc.tv/orucosajed
also i did sudo chmod 777 /media still impossible to write in that folder
my os is last one 01-10-2017 maybe older should work ?

provide URL of sudo journalctl -f | paste-log

And also suggest to SSH into OSMC and
cd /media/BE02395B02391A3B/FILMS\ HD
touch test.file

So, the sshd_config is the same like the actual Debian Stretch branch.
Not sure but going to Debian Stretch Development could be a try.

But before doing such radical things you should wait for some others ideas. Perhaps some of the mods here will have some pity with your issue. For this you should prepare some data

  • Upload a full set of logs after you have enabled debug logging and reproduced the issue; see here how to do this more in detail.
  • What is the exact error within Filezilla? Is it the actual version? Enable debug level 4 and copy’n paste the last debug Infos when the error occured.

Sorry for not being more help till now.

screenshot from filezilla error !
thx for your help

i create i new folder in hard disk with filezilla and send same file and pass also sended on other folder so why worked on other folder and not in film hd ??

@bendou: You can activate some debug log especially for the sftp-server:

  1. login via ssh and user osmc
  2. use editors sudo vi or sudo nano to change a specific line in /etc/ssh/ssd_config
    from:
    Subsystem sftp /usr/lib/openssh/sftp-server
    to:
    Subsystem sftp /usr/lib/openssh/sftp-server -l debug3
  3. sudo reboot
  4. reproduce the upload issue with the directory FILMS HD and FileZilla
  5. proceed the request from @fzinken but use sudo journalctl --no-pager | paste-log , so provide the URL and and do the test steps he suggested
  6. repeat steps 1. - 3. but this time remove the changes done in file /etc/ssh/sshd_config

Did the new folder have a space in the name? What happens if you rename “FILMS HD” to “FILMS_HD”, ie adding an underscore?

Also, if you created a new directory using filezilla, then it shows filezilla has permission to write to the directory /media/BE02395B02391A3B.

hi
i try all that but solve my pb after plug the hars disk on pc and repair failed sector
and now all work fine .
my pb was in hard disk not in permission
thx a lot for your help