Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Samba, 2nd hard drive, cannot access via network


  • This topic is locked This topic is locked

#1
sasuke781

sasuke781

    Banned

  • Banned
  • PipPip
  • 54 posts
the title pretty much says it all, i can connect the hard drive, therefor samba is configured correctly obviously. When i try to browse the drive i get Network access is denied....i have one hard drive shared with samba just fine....

running on Ubuntu 8.04 server.
  • 0

Advertisements


#2
Titan8990

Titan8990

    Member

  • Member
  • PipPipPipPipPip
  • 2,189 posts
I would like to see a comparison of the owner/file permissions of the new drive to the old one. We may just need to change the ownership for the drive.


Now, on your first drive the you currently have working properly. Is the whole drive accessible to share? Is the authentication still accepting anonymous?


Pick a directory that you know is working and functions in the share. cd to that directory and post the output for the following:

ls -al & ls -al ..


Then do it again at the mount point of the new drive. Example, if it was mounted at /media/share:

cd /media/share
ls -al & ls -al ..


Let me know the results.

Edited by Titan8990, 06 October 2008 - 03:47 PM.

  • 0

#3
sasuke781

sasuke781

    Banned

  • Topic Starter
  • Banned
  • PipPip
  • 54 posts
for the new hdd

[1] 23550
total 4292
drwx------ 2 emonahan root 16384 1969-12-31 18:00 .
drwxr-xr-x 6 root root 4096 2008-09-27 16:23 ..
-rwx------ 1 emonahan root 4368847 2008-07-13 11:32 04 Shake It.mp3
total 4292
drwx------ 2 emonahan root 16384 1969-12-31 18:00 .
drwxr-xr-x 6 root root 4096 2008-09-27 16:23 ..
-rwx------ 1 emonahan root 4368847 2008-07-13 11:32 04 Shake It.mp3
[1]+ Done ls --color=auto -al


thats the only one i can get you for now since the name on the partition has a space on it so i cant put the full name of the directory....its /media/volume 1 =\

the only diff i know of between the 2 is that one is formatted with fat32 and the one that works is in ntfs

the Partition Editor wont let me partition with ntfs

the working hdd is also a primary partition....if i can get the other hdd working with samba i can fix that cause i know i should =P

Edited by sasuke781, 06 October 2008 - 04:46 PM.

  • 0

#4
Titan8990

Titan8990

    Member

  • Member
  • PipPipPipPipPip
  • 2,189 posts
Your drives should be in EXT3. Because of being formated in NTFS and FAT32 your permissions are going to be a bit flaky (because file permissions are dependent on the format).

Alright now for the lesson on spaces via command line.


The fake windows slash (forward slash -> \ ) is what is used to indicate a space in the command line. Lets take for example we want to change to the directory "this is a directory with spaces", It would look like this:

cd this\ is\ a\ directory\ with\ spaces

Now for your specific needs:

cd /media/volume\ 1


Is the file system you showed me the file system that the OS is on? Surely you have your root file system in a Linux format.....


Also, on the command it looks like you left the .. off of the command. As of right now from what you showed me only the user "emonahan" should be able to access that section of the drive.

Edited by Titan8990, 07 October 2008 - 10:39 AM.

  • 0

#5
sasuke781

sasuke781

    Banned

  • Topic Starter
  • Banned
  • PipPip
  • 54 posts
OK here is the total output for volume 1

[email protected]:/media/Volume 1$ ls -al & ls -al ..
[1] 24732
total 72
drwxr-xr-x 6 root root 4096 2008-10-06 17:46 .
drwxr-xr-x 21 root root 4096 2008-07-30 16:49 ..
lrwxrwxrwx 1 root root 6 2008-07-28 21:01 cdrom -> cdrom0
drwxr-xr-x 2 root root 4096 2008-07-28 21:01 cdrom0
drwx------ 2 emonahan root 16384 1969-12-31 18:00 disk
drwxr-xr-x 2 root root 4096 2008-08-28 15:01 drive2
-rw-r--r-- 1 root root 200 2008-10-06 17:46 .hal-mtab
-rw------- 1 root root 0 2008-09-27 16:23 .hal-mtab-lock
drwxrwxrwx 1 root root 36864 2008-10-04 13:11 Volume 1
[email protected]:/media/Volume 1$ total 4573
drwxrwxrwx 1 root root 36864 2008-10-04 13:11 .
drwxr-xr-x 6 root root 4096 2008-10-06 17:46 ..
drwxrwxrwx 1 root root 53248 2008-10-01 23:54 AVIMovies
-rwxrwxrwx 1 root root 1736502 2008-09-20 14:56 current connected netmap.bmp
drwxrwxrwx 1 root root 4096 2008-06-05 01:48 Emulators
-rwxrwxrwx 1 root root 5159 2008-09-23 13:10 geekbot.txt
drwxrwxrwx 1 root root 12288 2008-10-04 12:30 Installers
drwxrwxrwx 1 root root 4096 2008-09-30 10:41 ISO files
drwxrwxrwx 1 root root 4096 2008-09-14 22:33 Misalanious
drwxrwxrwx 1 root root 4096 2008-08-06 22:07 Music
drwxrwxrwx 1 root root 8192 2008-08-27 12:33 Naruto
drwxrwxrwx 1 root root 8192 2008-09-29 17:13 Pictures
drwxrwxrwx 1 root root 4096 2008-09-27 12:39 Programs
-rwxrwxrwx 1 root root 1647334 2008-09-20 18:59 proposed netmap.bmp
drwxrwxrwx 1 root root 0 2008-09-27 16:32 System Volume Information
-rwxrwxrwx 1 root root 1097312 2008-09-21 01:08 teamspeak-server_2.0.24.1+debian-1_i386.deb
-rwxrwxrwx 1 root root 319 2008-09-30 12:54 things to do.txt
drwxrwxrwx 1 root root 4096 2008-10-04 13:11 to be ordered
-rwxrwxrwx 1 root root 24 2008-09-15 11:42 Unsaved Document 1
drwxrwxrwx 1 root root 4096 2008-08-26 18:28 Videos
drwxrwxrwx 1 root root 36864 2008-09-07 08:24 Videos for PSP
drwxrwxrwx 1 root root 4096 2008-09-25 17:53 Website

the reason for its ntfs file format is because on vmware i have this pysical hdd connected to my virtual windows machine because i have a media server.....since i cant find a working linux media server that supports the PS3's DLNA Protocal's. (if you know of one and would like to help me set it up ill gladly make a new topic and reformat this to w/e)

What i read on the Partition Editor was that if i wanted to share files with windows computers then i needed to format with fat32 =\ if this is untrue then ill reformat to an ext3 extended partition.


NOW for the full output of disk (yea idk it created that as the mount point)

[email protected]:/media/disk$ ls -al & ls -al ..
total 4292
drwx------ 2 emonahan root 16384 2008-10-07 13:36 .
drwxr-xr-x 6 root root 4096 2008-10-06 17:46 ..
-rwx------ 1 emonahan root 4368847 2008-07-13 11:32 04 Shake It.mp3
-rwx------ 1 emonahan root 0 2008-10-07 13:36 cdrom0
[1] 24805
total 72
drwxr-xr-x 6 root root 4096 2008-10-06 17:46 .
drwxr-xr-x 21 root root 4096 2008-07-30 16:49 ..
lrwxrwxrwx 1 root root 6 2008-07-28 21:01 cdrom -> cdrom0
drwxr-xr-x 2 root root 4096 2008-07-28 21:01 cdrom0
drwx------ 2 emonahan root 16384 2008-10-07 13:36 disk
drwxr-xr-x 2 root root 4096 2008-08-28 15:01 drive2
-rw-r--r-- 1 root root 200 2008-10-06 17:46 .hal-mtab
-rw------- 1 root root 0 2008-09-27 16:23 .hal-mtab-lock
drwxrwxrwx 1 root root 36864 2008-10-04 13:11 Volume 1
[1]+ Done ls --color=auto -al


btw...drive2 and the cdrom are nothing, i dont even have a cd drive connected to this machine =P so can i delete these from /media ?
  • 0

#6
Titan8990

Titan8990

    Member

  • Member
  • PipPipPipPipPip
  • 2,189 posts

btw...drive2 and the cdrom are nothing, i dont even have a cd drive connected to this machine =P so can i delete these from /media ?


Yes, you can.

Try:

chmod -R 777 /media/disk
  • 0

#7
sasuke781

sasuke781

    Banned

  • Topic Starter
  • Banned
  • PipPip
  • 54 posts
nope that didnt work either
  • 0

#8
Titan8990

Titan8990

    Member

  • Member
  • PipPipPipPipPip
  • 2,189 posts
Alright, lets try to specify the ownership via /etc/fstab. Does the drive currently automount via fstab?


Here is what it most likely looks like if you have it:

UUID=1649f5ce-e869-4a3f-b7a9-e638e0bfdc80 /media/backup ext3 defaults 0 0

What you are wanting to do is replace the "defaults" options with your user information.

Something like this:

auto,users,uid=1000,gid=1000,dmask=027,fmask=137

The uid and gid will be specific to your user accnt. gid is the admin group by default (and still should be unless you manually altered /etc/passwd).

This command should show you your uid and gid:

cat /etc/passwd | grep emonahan

My results were the following:

[email protected]:~$ cat /etc/passwd | grep jordan
jordan:x:1000:1000:Jordan Metzmeier,,,:/home/jordan:/bin/bash

uid and gid is in this format: uid:gid

So my uid and gid is 1000:1000

Putting it together:

UUID=1649f5ce-e869-4a3f-b7a9-e638e0bfdc80 /media/backup ext3 auto,users,uid=1000,gid=1000,dmask=027,fmask=137 0 0


Remember to replace UUID with the UUID of your hard drive and replace the mount point with the mount point of your extra drive.


Let me know if that resolves your issue.
  • 0

#9
sasuke781

sasuke781

    Banned

  • Topic Starter
  • Banned
  • PipPip
  • 54 posts
well.....problem is i dont know how to edit that lol i figured it out once and i did try to do it again, but i cant remember where that conf is =P
  • 0

#10
Titan8990

Titan8990

    Member

  • Member
  • PipPipPipPipPip
  • 2,189 posts
To edit it:

sudo nano /etc/fstab

If your drive is not already in that file, let me know.

Also, if you are doing backups via rsync /etc/fstab should be in your exclude list.
  • 0

Advertisements


#11
sasuke781

sasuke781

    Banned

  • Topic Starter
  • Banned
  • PipPip
  • 54 posts
wow....mine looks nothing like it should then.....i dont even know where to begin....and whats more...i just want the stupid thing to be accessable from anyone.....i dont care about permissions.....i want it to be 777....is there any way to make it auto mount and let anyone use them....

/dev/sda /media/Volume 1 ntfs defaults 0 0
/dev/sda5 /media/disk vfat shortname=mixed,uid=1000,uhelper=hal,utf8,nosuid,flush,umask=077,exec$
  • 0

#12
Titan8990

Titan8990

    Member

  • Member
  • PipPipPipPipPip
  • 2,189 posts
Unless you have set up udev rules then that is a bad way to add a drive to /etc/fstab. The reason that UUIDs are used instead of device names is because the device names change, without warning. Udev is not a system that I am a fan of but it does have it's advantages. Before I set up udev rules on my current server our backup drive would change drive letter approx once per week.


From what I have read 777 permissions are non-existant a NTFS drive and the best that you can do is declare ownership via /etc/fstab, which is how we got the point we are at now.

If it is not too late, I would reformat the drives in EXT3.

To find a drives UUID:

blkuid

[email protected]:~$ blkid
/dev/sda1: UUID="1649f5ce-e869-4a3f-b7a9-e638e0bfdc80" SEC_TYPE="ext2" TYPE="ext3" 
/dev/sdb1: UUID="eb90ff26-b99d-44b3-aedc-f641b6ed6faa" SEC_TYPE="ext2" TYPE="ext3" 
/dev/sdb2: TYPE="swap" UUID="567bbf65-3e84-4fc1-831e-74ee1603dd62"

Replace /dev/sdxx in /etc/fstab with the UUID of the drive.

Also, if you are the only one that access files on the drive, have you tried winscp?

Edit: Forgot to link to more info on Udev: http://en.wikipedia.org/wiki/Udev

After you have changed /etc/fstab include the results of: cat /etc/fstab in your next post.

Edited by Titan8990, 24 October 2008 - 11:45 AM.

  • 0

#13
sasuke781

sasuke781

    Banned

  • Topic Starter
  • Banned
  • PipPip
  • 54 posts
well what i need to know is this.....if they are formatted with ext3 will i be able to share the files with windows computers like i am now? if soo i will reformat and do all that stuff above
  • 0

#14
Titan8990

Titan8990

    Member

  • Member
  • PipPipPipPipPip
  • 2,189 posts

well what i need to know is this.....if they are formatted with ext3 will i be able to share the files with windows computers like i am now? if soo i will reformat and do all that stuff above



Yes, SAMBA will share EXT3 or any filesystem that is recognized by your OS. SMB is the method that it is shared in.
  • 0

#15
sasuke781

sasuke781

    Banned

  • Topic Starter
  • Banned
  • PipPip
  • 54 posts
kk awesome so can you help me out with the formatting, i have to format the new disk and then move files with samba then format the old ntfs to ext3 then rearange my files so this might take a little while

btw sorry for the late reply

Edited by sasuke781, 02 November 2008 - 12:04 PM.

  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP