LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 11-04-2013, 09:06 AM   #1
kylechat416
LQ Newbie
 
Registered: Nov 2013
Posts: 5

Rep: Reputation: Disabled
Files hidden in Bash and Samba, but not in X


Hi,

I have a raspberry pi running Raspbian Wheezy. This has a 100GB SATA ext4 formatted hard drive connected via a USB/SATA converter, which is mounted at /media/SHARE. This directory is shared using Samba, and Pydio, using an Apache2 server.

Everything was working fine until I restarted the Pi. Now, only one folder is visible in this directory, owned by my user (pi) and in the www-data group. The files that are now missing are all owned by www-data and in the www-data group. All the files and directories are chmod to 777 recursively

The strange thing is that when I am in the X environment, everything shows up fine, but when using Bash, SSH, Samba, or Pydio, only the one folder shows up. Even as root, nothing shows up, but does in X.

Any help would be much appreciated, as I am completely baffled by this :S
 
Old 11-04-2013, 09:08 AM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,797
Blog Entries: 1

Rep: Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341
Just to be clear,..

If you do a 'whoami' the answer is 'root'

and if you use 'ls -alh' in the directory in question, you do not see anything?

But in X, you do?
 
Old 11-04-2013, 09:13 AM   #3
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,121

Rep: Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270
I think the power of usb port is not switched off during reboot therefore the external drive will not recognize the reboot, its state is unclear (at least for me). I always had to unplug and plug it in again.
 
Old 11-04-2013, 09:26 AM   #4
kylechat416
LQ Newbie
 
Registered: Nov 2013
Posts: 5

Original Poster
Rep: Reputation: Disabled
szboardstretcher:

as pi and root users, both have the same result, only showing the one folder.

And yes, in X, everything shows up fine and works as it should.

pan64:

I'll try rebooting the pi and unplugging the HD when I get home tonight, as I'm just at work on my break at the moment, and can only SSH.

Thanks for the fast replies guys
 
Old 11-04-2013, 09:59 AM   #5
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
as your at home, is the USB drive showing in df? either way manually umount and mount the drive to see if it shows up properly again via CLI for you.
 
Old 11-04-2013, 10:22 AM   #6
kylechat416
LQ Newbie
 
Registered: Nov 2013
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by lleb View Post
as your at home, is the USB drive showing in df? either way manually umount and mount the drive to see if it shows up properly again via CLI for you.
I've tried that, with no luck. I've remounted the drive and also rebooted the Pi several times.

I'm thinking that pan64's idea may work, as the HD has a seperate power supply and hasn't been switched off since it was set up.

I'll let you know how i get on later tonight (in the UK)
 
Old 11-04-2013, 03:27 PM   #7
kylechat416
LQ Newbie
 
Registered: Nov 2013
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thumbs up

OK, I've fixed it.

The HD was being mounted at "/media/SHARE_" for reasons unknown. "/media/SHARE" was referring to a directory on the Pi's SD card.

Any thoughts on why this happened?

Thanks for your help guys, much appreciated
 
Old 11-04-2013, 08:15 PM   #8
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
if it was mounted at all it should have shown up in df.

as to why its mounting there that would be a distro specific issue.as the RPi has its OS on the SD card that is a bit understandable. did your distro setup multi partitions? if so then that is probably a standard procedure for your distro.

Code:
pi@raspbmc:~$ df -Th
Filesystem               Type  Size  Used Avail Use% Mounted on
/dev/mmcblk0p2           ext4   15G  1.1G   13G   8% /
/dev/mmcblk0p1           vfat   69M  6.3M   63M  10% /boot
jackknife:/centos        nfs4  1.8T  969G  722G  58% /home/pi/Movies
jackknife:/NFS_TV_Shows/ nfs4  1.4T  755G  551G  58% /home/pi/TV_Shows
jackknife:/New/          nfs4  3.6T  1.3T  2.2T  38% /home/pi/New
That is my RPi, but im running RaspBMC and the three mounts in /home/pi are NFS shares that contain my media for the family.

note that RaspBMC only has 2 partitions:

Code:
root@raspbmc:~# fdisk -l

Disk /dev/mmcblk0: 16.0 GB, 16012804096 bytes
4 heads, 16 sectors/track, 488672 cylinders, total 31275008 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d4f0f

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1            4096      147455       71680    c  W95 FAT32 (LBA)
/dev/mmcblk0p2          151552    31275007    15561728   83  Linux
so again with df and fdisk -l will show you what is both mounted, were it is mounted, and what type of file system each mount point contains.

Last edited by lleb; 11-04-2013 at 08:17 PM.
 
Old 11-05-2013, 02:00 AM   #9
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,121

Rep: Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270
Quote:
Originally Posted by kylechat416 View Post
OK, I've fixed it.

The HD was being mounted at "/media/SHARE_" for reasons unknown. "/media/SHARE" was referring to a directory on the Pi's SD card.

Any thoughts on why this happened?

Thanks for your help guys, much appreciated
That is not the reason, but the outcome. The system thought /media/SHARE is already in use, therefore it generated another name as mount point. Probably it is a timing issue.
 
Old 11-06-2013, 03:19 PM   #10
kylechat416
LQ Newbie
 
Registered: Nov 2013
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by lleb View Post
so again with df and fdisk -l will show you what is both mounted, were it is mounted, and what type of file system each mount point contains.
Thanks for that I never knew about df.

I deleted the /media/SHARE directory, and rebooted the Pi. It then mounted properly at /media/SHARE.

I can't think where this directory came from though... I never created it :S
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] hide hidden files (.kde .bash etc) to end user in vsftpd prayag_pjs Linux - Newbie 2 09-09-2010 04:44 AM
Samba share between Fedora 12 and OSX Snow Leopard - Hidden Files Permissions Issue MessedUpHare Linux - Networking 2 04-22-2010 08:41 AM
bash: mv hidden and not hidden files lupe Linux - General 4 06-22-2009 02:27 PM
Bash scripting problem: Can't get a list of all files, including hidden ones oxi Programming 24 03-12-2007 07:19 AM
samba hidden files dungsacto Linux - Software 1 04-27-2005 03:53 AM


All times are GMT -5. The time now is 03:58 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration