Logo 
Search:

Unix / Linux / Ubuntu Forum

Ask Question   UnAnswered
Home » Forum » Unix / Linux / Ubuntu       RSS Feeds

Shared External USB Drive

  Date: Jan 08    Category: Unix / Linux / Ubuntu    Views: 538
  

I am
running 10.04 /Lucid, Apache server and wview weather software for my weather
data archiving and display. I recently installed a USB disk drive (/media/My\
Passport/) and SAMBA. The drive is formatted NTFS and I use this disk for image
backups of 4 Windows 7 computers and also backup of my SQLite weather data using
cron.

My problem is that I cannot access the disk from my Windows 7 computers. I see
the UBUNTU computer on the network and I can see the the "shares" device on the
computer but when I attempt to access the device I receive: "Access Denied You
do not have permission to access this device" Nautalus will not let me change
the owner nor the group permissions of the device. I am stumped, any help would
be appreciated.

My site url: http://www.w4lcs.com/weather

Share: 

 

18 Answers Found

 
Answer #1    Answered On: Jan 08    

I have the opposite problem. The Linux half (kubuntu 10.10) of my dual
boot laptop can not see a USB external HDD, while the Win XP half talks
to it without difficulty.

Any other USB device works OK on Kubuntu, but it just does not know
that the mass drive is there.

 
Answer #2    Answered On: Jan 08    

The only way I could see that happening is if the drive has been
encrypted by ms windows - thus, thereafter the peecee OS can see the
drive but the linux install (along with every other OS instance) can't.

If it's not encrypted, then I'd be curious to know how the drive is
formatted. This is an interesting riddle because linux can generally see
much more hardware detail than ms windows can.

 
Answer #3    Answered On: Jan 08    

I first tried it on my old desktop single boot with Kubuntu 10.10.
Absolutely nothing. Daughter's laptop (Vista) could see it OK, so
over to the dual boot machine. Here XP sees it. Kubuntu does not.

There was a small Windows file group that must have come with the
drive - so I removed them and tried again. Win properties says it is
formatted FAT32. So, I am bit puzzled but continuing to try sort it out.

 
Answer #4    Answered On: Jan 08    

If I understand you correctly the USB disk drive is left mounted on
your Lucid Ubuntu machine and you are trying to access it over the
network from your Windows 7 machines. If you have Samba installed
correctly it should work but you will have to add the USB drive
manually as a shared drive to the configuration tab of gsamba-admin.

My smb.conf includes:

[Disk-1]
comment = disk-1
path = /media/4A42-57A5
; ^== name of drive mounted as a folder in
the Media folder.
read only = no
available = yes
browseable = yes
writable = yes
guest ok = yes
public = yes
printable = no
locking = no
strict locking = no

This is not necessarily 100% correct, but it usually works. Yet
sometimes I find that I have to go into gsamba-admin and deactivate
then restart the network before it works properly. That then requires
manually running winbindd as root. I also find I have to reset the
password for my account with smbpasswd -a [username] to get full
visibility and sharing going.

I've never found out why this is necessary, but I'd certainly like
some advice on this! I've asked about this anomaly several times and
nobody has responded with anything helpful. I am running Kubuntu 10.04
and 10.10, with one Win XP machine. On a good day everything is
shared, visible and writable everywhere - but there are bad days which
is frustrating because I've never been able to find out exactly why.

 
Answer #5    Answered On: Jan 08    

Your assumptions are correct. I have added the shared
device to smb.conf, however not with all of your listed params. It may be that I
need to restart the network and reset my password to get the permissions. I will
try this when I get off of work tonight.

 
Answer #6    Answered On: Jan 08    

Have you created a Samba account on your server machine? (sudo smbpasswd -a
username)

Then use those login credentials from your Windows 7 PC.

I have a very similar setup: USB NTFS drive plugged in to a Ubuntu machine
running Samba, with other desktops running Ubuntu or Windows (XP and Vista) on a
LAN. I have no problems accessing shared folders on the USB drive from the
Windows boxes.

I did have to disable the Windows firewall on my old XP box to get to my shared
folders. But that was not specific to the USB drive.

 
Answer #7    Answered On: Jan 08    

Yes I created the account with smbpsswd. I can see the shared folders and the
shared device as defined in smb.conf [usbdrive]. I can even see the files in the
[Homes] folder after enterining the user/password. When I double click the
[usbdrive] folder and enter the username and password I then get the Access
Denied message. What I really wish to do is Map a network drive (i.e.
\\W4LCS-SERVER\media/usbdrive) to S: on my windows 7 machines. I double checked
my smb.conf and have even run chmod -R 777 as suggested by another forum. No
Luck.

 
Answer #8    Answered On: Jan 08    

Have you tried putting:
guest ok = yes
into your share section?

 
Answer #9    Answered On: Jan 08    

Yes, still no luck.I have tried everything with no success.

 
Answer #10    Answered On: Jan 08    

There are a very few unique situations that do try one's patience. Set
yourself a time limit and if that passes without an answer just give it up
for now and go in a different direction.

...it can happen in any operating system!

 
Answer #11    Answered On: Jan 08    

You are exactly right. This is not a major issue other than I hate to admit that
it beat me. However, sometimes what is supposed to work just does not because of
some obscure reason. When I was writing code I solved many a problem laying in
the bed, looking at the ceiling, analyzing the issues. I just hate admitting
defeat, but I don't have the energy I had back then.

 
Answer #12    Answered On: Jan 08    

I would wake up with an answer but unless I wrote it down "where are
are my specs' " it was gone again by morning.

 
Answer #13    Answered On: Jan 08    

You have a share section right:
[sharename]
under this you have a share:

path = /sharename WATCH YOUR SPACES (space on either side of =
guest ok = yes
WATCH YOUR SPACES

MAKE SURE YOUR SHARENAME HAS OTHER PERMISSION SET TO RWX.

I have done this a lot and it is always some little item that goops it up.

 
Answer #14    Answered On: Jan 08    

Below is my shared section of /etc/samba/smb.conf

# My Shared Drive Western Digital 500gb
[usbdrive]
path = /media/usbdrive
browseable = yes
read only = no
locking = no
guest ok = yes
available = yes
writable = yes
public = yes
printable = no
locking = no
strict locking = no

Below is my /etc/fstab entries, I have tried both entries with no success.

#
#Mount Western Digital Disk
#
UUID=EA6854D268549F5F /media/usbdrive ntfs-3g
auto,users,mode=0777,uid=,gid=,dmask=027,fmask=137,rw,utf8 0 0

#Samba
//W4LCS-SERVER/usbdrive /media/usbdrive cifs user=user,uid=,gid=,0 0

 
Answer #15    Answered On: Jan 08    

Could you try creating a folder under root, setting the permissions, and sharing
this folder. After looking this over I remember having difficulty sharing the
removable type of drives (USB) and I would like to see if this is your case as
well. By creating a share on a primary drive, we can see if this is a problem
with the USB or Samba in general.

 
Answer #16    Answered On: Jan 08    

Here are my results:

1. Logged in as root: sudo su
2. Created folder: mkdir /media/wddrive
3. Changed permissions:chmod ugo+rwx /media/wddrive
4. Verified that root was owner and -user-group-others had read/write access
5. Added the following to Samba global area to allow share to work:
usershare owner only = false
6. Shared folder /media/wddrive
7. Changed Samba share to [wddrive]
8. Changed Samba share path to /media/wddrive
9. Changed /etc/fstab to the following:
UUID=EA6854D268549F5F /media/wddrive ntfs-3gÂ
auto,users,dmask=027,fmask=137,rw,utf8Â 0Â 0
10. Executed: sudo mount -a
11. Executed: sudo /etc/init.d/smbd restart
12. Checked permissions of /media/wddrive and found that the "Owner: changed
from root to "bob" and permissions for group changed to "Access only" and others
to "None"
13. I can view the files from Ubuntu but cannot access from the network.

 
Answer #17    Answered On: Jan 08    

Your original post caused me to go through a more logical process that allowed
me to determine that the /etc/fstab mount was causing the owner and folder
permissions to change. I cheated and installed Pysdm to mount the drive without
a manual entry into /etc/fstab. The allowed the USB drive to mount with "root"
as owner and all permissions correct. I could then access and read all files on
the USB drive from my Windows 7 computers with all of the Samba Shared section
commented out. If I attempt to copy a file to the USB Drive I get "You need
permission to perform this action". I then uncommented the Shared section of
smb.con and restarted Samba.
I now get "Access Denied" again after entering the Username and Password. Any
Thoughts?

 
Answer #18    Answered On: Jan 08    

Success at last. Here is my /etc/fstab mount command.

/dev/sdb1
/media/wddrive ntfs
nls=iso8859-1,_netdev,umask=000,nodev,user,owner \
0 0

Here is my smb.conf:

[wddrive]
path = /media/wddrive
writeable = yes
; browseable = yes
valid users = BOBNOTEBOOK, Bob-PC, MARYNOTEBOOK, bob

I confess that I used Pysdm to configure /etc/fstab and system-config-samba for
smb.conf. Anyway it now works. What a task..........Thanks for all of the
replies.

 
Didn't find what you were looking for? Find more on Shared External USB Drive Or get search suggestion and latest updates.




Tagged: