LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-02-2014, 07:32 PM   #1
samalchow
LQ Newbie
 
Registered: Jan 2014
Location: Colorado
Distribution: Debian/Centos
Posts: 18

Rep: Reputation: Disabled
Permission denied on USB HDD using WinSCP


I've had a USB HDD hooked up to my Debian distro for some time. Currently I have been using the sharing the drive using samba. I've just tried to use WinSCP to transfer some files to this drive but I've been getting a "permission denied" from the application. Currently its set to nobody:nogroup. What is causing this?
 
Old 02-02-2014, 09:30 PM   #2
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
is if physically connected to the Debian box? if so what is the output of
Code:
df -Th
also what path are you using to try to get access via WinSCP and what user/pw did you log into the Debian system with?
 
Old 02-03-2014, 09:56 AM   #3
samalchow
LQ Newbie
 
Registered: Jan 2014
Location: Colorado
Distribution: Debian/Centos
Posts: 18

Original Poster
Rep: Reputation: Disabled
Yes its physically connected. It's the last line.

Filesystem Type Size Used Avail Use% Mounted on
rootfs rootfs 451G 13G 416G 3% /
udev devtmpfs 10M 0 10M 0% /dev
tmpfs tmpfs 406M 3.2M 403M 1% /run
/dev/mapper/debian-root ext4 451G 13G 416G 3% /
tmpfs tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs tmpfs 811M 924K 810M 1% /run/shm
/dev/sda1 ext2 228M 17M 199M 8% /boot
/dev/sr1 udf 644M 644M 0 100% /media/WD SmartWare
/dev/sdb2 ext3 916G 48G 823G 6% /media/ExtraNas
 
Old 02-03-2014, 10:24 AM   #4
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
well its mounted, now as root run the following, also please use code flags it really makes life much simpler to read the copy/paste you put on the screen thank you.

Code:
ls -laF /media/ExtraNas
they should look something like this:


Code:
[user@centos ~]$ df -Th
Filesystem                    Type   Size  Used Avail Use% Mounted on
/dev/mapper/vg_centos-lv_root ext4    50G   18G   29G  39% /
tmpfs                         tmpfs  3.9G  4.0K  3.9G   1% /dev/shm
/dev/sdb1                     ext4   485M  149M  312M  33% /boot
/dev/mapper/vg_centos-lv_home ext4   1.8T  974G  717G  58% /exports/centos
/dev/sda1                     ext4   1.4T  832G  475G  64% /exports/NFS_TV_Shows
/dev/sdc1                     ext4   3.6T  2.0T  1.5T  58% /exports/New
[user@centos ~]$ ls -laF /exports/New/
total 36
drwxr-xr-x. 4 user  user    4096 Aug  6 16:03 ./
drwxr-xr-x. 5 root root   4096 Aug  2  2013 ../
-rw-r--r--. 1 user  games  6148 Jan 19 23:50 .DS_Store
drwx------. 2 user  user   16384 Aug  4  2013 lost+found/
drwxrwxr-x. 8 user  user    4096 Aug 28 06:43 public/
Note that one of the hidden files (.DS_Store) is a different group then the directories. thats ok. it tells you something about the UID/GUID of the user who created the file. FYI its created by my FileZilla client even though it uses the same user user UID/GUID as my normal user. due to FileZilla there are some issues with some files. its easy to fix and to be blunt does not affect access from my normal user via any other means of access.

now the reason I want you to post the ls -laF (those are lower case L's btw) is so you can look at the user and group ownership of your mount point.

/media/foo is typically created automagically via the GUI so the permissions should be correct. As it is a Linux formatted partition you should also be ok. worst case you go in as root and fix things .
 
Old 02-03-2014, 10:54 AM   #5
samalchow
LQ Newbie
 
Registered: Jan 2014
Location: Colorado
Distribution: Debian/Centos
Posts: 18

Original Poster
Rep: Reputation: Disabled
This is what I got.

Code:
ls -laF /media/ExtraNas/
total 28
drwxrwxrwx 4 nobody nogroup 4096 Feb  3 09:53 ./
drwxr-xr-x 5 root   root    4096 Jan 20 19:54 ../
drwxr-xr-x 4 nobody nogroup 4096 Feb  2 18:08 BackupofaBackup/
drwxr-xr-x 4 nobody nogroup 4096 Feb  2 18:17 CakeGalleryBackup/
-rwxr--r-- 1 nobody nogroup 4096 Jan  6 23:20 ._.DS_Store*
-rwxr--r-- 1 nobody nogroup 6148 Jan  6 23:20 .DS_Store*
 
Old 02-03-2014, 10:58 AM   #6
samalchow
LQ Newbie
 
Registered: Jan 2014
Location: Colorado
Distribution: Debian/Centos
Posts: 18

Original Poster
Rep: Reputation: Disabled
With the "BackupofaBackup" directory what I was trying to upload files to
 
Old 02-03-2014, 07:08 PM   #7
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
simple, look at the permissions on that directory...

Quote:
drwxr-xr-x
it clearly states the owner, in this case nobody (not a good thing), has full read, write, execute permissions, but group and other only have read and execute.

what is the output of
Code:
 $ whoami
run as your normal user?
 
Old 02-03-2014, 09:51 PM   #8
samalchow
LQ Newbie
 
Registered: Jan 2014
Location: Colorado
Distribution: Debian/Centos
Posts: 18

Original Poster
Rep: Reputation: Disabled
Output is "smalchow", my default user.

If nobody is the group, wouldn't anybody be able to write to it? Belive that was the original thought process
 
Old 02-05-2014, 08:25 PM   #9
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
your user would have to be in the nobody group.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
'Permission denied' executing .sh from mounted vfat USB jodib Linux - General 7 08-06-2013 08:51 PM
Permission Denied when trying to access USB device dmoyamendez Linux - Newbie 3 11-02-2011 11:21 AM
usb flash drive permission denied LinuxGuru707 Linux - Software 2 11-11-2009 12:01 PM
Help for Mounting a USB Memory Stick in SUSE 10.3. Permission Denied. flatstan SUSE / openSUSE 10 10-15-2008 11:46 PM
Unable to open USB port : Permission denied After 7.10 upgrade Fixed_it Ubuntu 1 12-26-2007 11:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration