• We've upgraded our forums. Please post any issues/requests in this thread.

Locked out of drive on Ubuntu Server

Joined
Nov 8, 2008
Messages
779 (0.23/day)
Likes
77
Location
Sydney, Australia
System Name Gearbox || Server
Processor i5 3570K @ 4.0Ghz || E8400 @ Stock 3Ghz
Motherboard Gigabyte Z68XP-UD3 || Gigabyte EP41-UD3L
Cooling Stock || Stock
Memory 8GB G.Skill RipjawX DDR3 @ 1600mhz || 4GB Kingston Value DDR2 800Mhz
Video Card(s) ASUS R9 270X Direct CU II TOP @ 1120/1500 || N/A
Storage Samsung 840 EVO 250GB || 1TB WD Green, 2TB WD Green, 3TB WD Red
Display(s) HP x23 LED 23" Full HD Panel
Case Corsair 200R || Open-Air
Audio Device(s) Audioengine D1 + Logitech Z623/Audio Technica ATH-M50 || N/A
Power Supply Antec EarthWatts Platinum 650 W || Antec Neo Eco 450 W
Software Windows 8.1 Update 3 Pro 64 || Ubuntu Server 14.04 64
#1
Hey guys,
I was trying to delete some torrents that I had downloaded with transmission-daemon and was unable to from my samba share on windows. I figured the best solution was to 'sudo chmod -R 0777 /media/Storage' (my drive with samba) but apparently not.
This locked both my windows user and my user on my ubuntu server out of the drive completely with a message saying 'ls: cannot access /media/Storage: Permission denied'.
I am able to login as root with 'sudo bash' and make changes however I am uncertain as to how to make my drive accessible again.
Doing a 'ls -ld' on the directory shows 'drwsrwsrwx 39 root root 4096 Nov 17 21:20 /media/Storage'
Any ideas? :confused:
 

Aquinus

Resident Wat-man
Joined
Jan 28, 2012
Messages
10,401 (4.84/day)
Likes
5,481
Location
Concord, NH
System Name Kratos
Processor Intel Core i7 3930k @ 4.2Ghz
Motherboard ASUS P9X79 Deluxe
Cooling Zalman CPNS9900MAX 130mm
Memory G.Skill DDR3-2133, 16gb (4x4gb) @ 9-11-10-28-108-1T 1.65v
Video Card(s) MSI AMD Radeon R9 390 GAMING 8GB @ PCI-E 3.0
Storage 2x120Gb SATA3 Corsair Force GT Raid-0, 4x1Tb RAID-5, 1x500GB
Display(s) 1x LG 27UD69P (4k), 2x Dell S2340M (1080p)
Case Antec 1200
Audio Device(s) Onboard Realtek® ALC898 8-Channel High Definition Audio
Power Supply Seasonic 1000-watt 80 PLUS Platinum
Mouse Logitech G602
Keyboard Rosewill RK-9100
Software Ubuntu 17.10
Benchmark Scores Benchmarks aren't everything.
#2
Hey guys,
I was trying to delete some torrents that I had downloaded with transmission-daemon and was unable to from my samba share on windows. I figured the best solution was to 'sudo chmod -R 0777 /media/Storage' (my drive with samba) but apparently not.
This locked both my windows user and my user on my ubuntu server out of the drive completely with a message saying 'ls: cannot access /media/Storage: Permission denied'.
I am able to login as root with 'sudo bash' and make changes however I am uncertain as to how to make my drive accessible again.
Doing a 'ls -ld' on the directory shows 'drwsrwsrwx 39 root root 4096 Nov 17 21:20 /media/Storage'
Any ideas? :confused:
try chowning it first:

Code:
sudo chown -R [username]:[group] /to/some/path
Then try granting user permissions.

Code:
sudo chmod -R u+rw /to/some/path
 
Joined
Nov 8, 2008
Messages
779 (0.23/day)
Likes
77
Location
Sydney, Australia
System Name Gearbox || Server
Processor i5 3570K @ 4.0Ghz || E8400 @ Stock 3Ghz
Motherboard Gigabyte Z68XP-UD3 || Gigabyte EP41-UD3L
Cooling Stock || Stock
Memory 8GB G.Skill RipjawX DDR3 @ 1600mhz || 4GB Kingston Value DDR2 800Mhz
Video Card(s) ASUS R9 270X Direct CU II TOP @ 1120/1500 || N/A
Storage Samsung 840 EVO 250GB || 1TB WD Green, 2TB WD Green, 3TB WD Red
Display(s) HP x23 LED 23" Full HD Panel
Case Corsair 200R || Open-Air
Audio Device(s) Audioengine D1 + Logitech Z623/Audio Technica ATH-M50 || N/A
Power Supply Antec EarthWatts Platinum 650 W || Antec Neo Eco 450 W
Software Windows 8.1 Update 3 Pro 64 || Ubuntu Server 14.04 64
#3
try chowning it first:

Code:
sudo chown -R [username]:[group] /to/some/path
Then try granting user permissions.

Code:
sudo chmod -R u+rw /to/some/path
Both commands executed without errors however I am still unable to access/ls the directory from either Windows or Ubuntu. Still getting the same 'ls: cannot access /media/Storage: Permission denied' message. :ohwell:
 

Aquinus

Resident Wat-man
Joined
Jan 28, 2012
Messages
10,401 (4.84/day)
Likes
5,481
Location
Concord, NH
System Name Kratos
Processor Intel Core i7 3930k @ 4.2Ghz
Motherboard ASUS P9X79 Deluxe
Cooling Zalman CPNS9900MAX 130mm
Memory G.Skill DDR3-2133, 16gb (4x4gb) @ 9-11-10-28-108-1T 1.65v
Video Card(s) MSI AMD Radeon R9 390 GAMING 8GB @ PCI-E 3.0
Storage 2x120Gb SATA3 Corsair Force GT Raid-0, 4x1Tb RAID-5, 1x500GB
Display(s) 1x LG 27UD69P (4k), 2x Dell S2340M (1080p)
Case Antec 1200
Audio Device(s) Onboard Realtek® ALC898 8-Channel High Definition Audio
Power Supply Seasonic 1000-watt 80 PLUS Platinum
Mouse Logitech G602
Keyboard Rosewill RK-9100
Software Ubuntu 17.10
Benchmark Scores Benchmarks aren't everything.
#4
Both commands executed without errors however I am still unable to access/ls the directory from either Windows or Ubuntu. Still getting the same 'ls: cannot access /media/Storage: Permission denied' message. :ohwell:
Stop trying to access it in Windows until you can actually get into it in Linux.

Is the drive even mounted?

How does the output of
Code:
sudo mount
look?
 
Joined
Nov 8, 2008
Messages
779 (0.23/day)
Likes
77
Location
Sydney, Australia
System Name Gearbox || Server
Processor i5 3570K @ 4.0Ghz || E8400 @ Stock 3Ghz
Motherboard Gigabyte Z68XP-UD3 || Gigabyte EP41-UD3L
Cooling Stock || Stock
Memory 8GB G.Skill RipjawX DDR3 @ 1600mhz || 4GB Kingston Value DDR2 800Mhz
Video Card(s) ASUS R9 270X Direct CU II TOP @ 1120/1500 || N/A
Storage Samsung 840 EVO 250GB || 1TB WD Green, 2TB WD Green, 3TB WD Red
Display(s) HP x23 LED 23" Full HD Panel
Case Corsair 200R || Open-Air
Audio Device(s) Audioengine D1 + Logitech Z623/Audio Technica ATH-M50 || N/A
Power Supply Antec EarthWatts Platinum 650 W || Antec Neo Eco 450 W
Software Windows 8.1 Update 3 Pro 64 || Ubuntu Server 14.04 64
#5
Stop trying to access it in Windows until you can actually get into it in Linux.

Is the drive even mounted?

How does the output of
Code:
sudo mount
look?
sudo mount dumps
Code:
/dev/sdb1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
/dev/sda1 on /media/Storage type ext4 (rw)
/dev/sda1 on /media/Storage type ext4 (rw) is the drive
 

Aquinus

Resident Wat-man
Joined
Jan 28, 2012
Messages
10,401 (4.84/day)
Likes
5,481
Location
Concord, NH
System Name Kratos
Processor Intel Core i7 3930k @ 4.2Ghz
Motherboard ASUS P9X79 Deluxe
Cooling Zalman CPNS9900MAX 130mm
Memory G.Skill DDR3-2133, 16gb (4x4gb) @ 9-11-10-28-108-1T 1.65v
Video Card(s) MSI AMD Radeon R9 390 GAMING 8GB @ PCI-E 3.0
Storage 2x120Gb SATA3 Corsair Force GT Raid-0, 4x1Tb RAID-5, 1x500GB
Display(s) 1x LG 27UD69P (4k), 2x Dell S2340M (1080p)
Case Antec 1200
Audio Device(s) Onboard Realtek® ALC898 8-Channel High Definition Audio
Power Supply Seasonic 1000-watt 80 PLUS Platinum
Mouse Logitech G602
Keyboard Rosewill RK-9100
Software Ubuntu 17.10
Benchmark Scores Benchmarks aren't everything.
#6
So after you chmod and chown the directory, what does "ls -l /media/" show?

Preferably a before and after would be nice.
 
Joined
Nov 8, 2008
Messages
779 (0.23/day)
Likes
77
Location
Sydney, Australia
System Name Gearbox || Server
Processor i5 3570K @ 4.0Ghz || E8400 @ Stock 3Ghz
Motherboard Gigabyte Z68XP-UD3 || Gigabyte EP41-UD3L
Cooling Stock || Stock
Memory 8GB G.Skill RipjawX DDR3 @ 1600mhz || 4GB Kingston Value DDR2 800Mhz
Video Card(s) ASUS R9 270X Direct CU II TOP @ 1120/1500 || N/A
Storage Samsung 840 EVO 250GB || 1TB WD Green, 2TB WD Green, 3TB WD Red
Display(s) HP x23 LED 23" Full HD Panel
Case Corsair 200R || Open-Air
Audio Device(s) Audioengine D1 + Logitech Z623/Audio Technica ATH-M50 || N/A
Power Supply Antec EarthWatts Platinum 650 W || Antec Neo Eco 450 W
Software Windows 8.1 Update 3 Pro 64 || Ubuntu Server 14.04 64
#7
before
Code:
sudo ls -la /media/Storage
drwsrwsrwx 39 root root 4096 Nov 17 21:20 /media/Storage
after
Code:
ls -l /media
ls: cannot access /media/cdrom: Permission denied
ls: cannot access /media/Storage: Permission denied
total 0
d????????? ? ? ? ?            ? cdrom
d????????? ? ? ? ?            ? Storage

sudo ls -l
total 8
drwxr-xr-x  2 root      root      4096 Oct  8 20:30 cdrom
drwsrwsrwx 39 onafets onafets 4096 Nov 17 21:20 Storage
 

Aquinus

Resident Wat-man
Joined
Jan 28, 2012
Messages
10,401 (4.84/day)
Likes
5,481
Location
Concord, NH
System Name Kratos
Processor Intel Core i7 3930k @ 4.2Ghz
Motherboard ASUS P9X79 Deluxe
Cooling Zalman CPNS9900MAX 130mm
Memory G.Skill DDR3-2133, 16gb (4x4gb) @ 9-11-10-28-108-1T 1.65v
Video Card(s) MSI AMD Radeon R9 390 GAMING 8GB @ PCI-E 3.0
Storage 2x120Gb SATA3 Corsair Force GT Raid-0, 4x1Tb RAID-5, 1x500GB
Display(s) 1x LG 27UD69P (4k), 2x Dell S2340M (1080p)
Case Antec 1200
Audio Device(s) Onboard Realtek® ALC898 8-Channel High Definition Audio
Power Supply Seasonic 1000-watt 80 PLUS Platinum
Mouse Logitech G602
Keyboard Rosewill RK-9100
Software Ubuntu 17.10
Benchmark Scores Benchmarks aren't everything.
#8
before
Code:
sudo ls -la /media/Storage
drwsrwsrwx 39 root root 4096 Nov 17 21:20 /media/Storage
after
Code:
ls -l /media
ls: cannot access /media/cdrom: Permission denied
ls: cannot access /media/Storage: Permission denied
total 0
d????????? ? ? ? ?            ? cdrom
d????????? ? ? ? ?            ? Storage

sudo ls -l
total 8
drwxr-xr-x  2 root      root      4096 Oct  8 20:30 cdrom
drwsrwsrwx 39 onafets onafets 4096 Nov 17 21:20 Storage
Hmmm, and you can't access it now? I'm assuming "onafets" is your account.

When you restart are the permissions the same?

These are the permissions that I have on my workstation for /media

maybe

Code:
sudo chown -R root:root /media
sudo chmod -R 775 /media
Restart before you try anything else then tell me how it works. Also are you mounting the drive or is Ubuntu doing it for you?
 
Joined
Nov 8, 2008
Messages
779 (0.23/day)
Likes
77
Location
Sydney, Australia
System Name Gearbox || Server
Processor i5 3570K @ 4.0Ghz || E8400 @ Stock 3Ghz
Motherboard Gigabyte Z68XP-UD3 || Gigabyte EP41-UD3L
Cooling Stock || Stock
Memory 8GB G.Skill RipjawX DDR3 @ 1600mhz || 4GB Kingston Value DDR2 800Mhz
Video Card(s) ASUS R9 270X Direct CU II TOP @ 1120/1500 || N/A
Storage Samsung 840 EVO 250GB || 1TB WD Green, 2TB WD Green, 3TB WD Red
Display(s) HP x23 LED 23" Full HD Panel
Case Corsair 200R || Open-Air
Audio Device(s) Audioengine D1 + Logitech Z623/Audio Technica ATH-M50 || N/A
Power Supply Antec EarthWatts Platinum 650 W || Antec Neo Eco 450 W
Software Windows 8.1 Update 3 Pro 64 || Ubuntu Server 14.04 64
#9
Code:
sudo chmod -R 775 /media
Allows me to access the drive and its contents however I ended up modifying it to 777 so I was able to delete my files. Thank you!
 

Aquinus

Resident Wat-man
Joined
Jan 28, 2012
Messages
10,401 (4.84/day)
Likes
5,481
Location
Concord, NH
System Name Kratos
Processor Intel Core i7 3930k @ 4.2Ghz
Motherboard ASUS P9X79 Deluxe
Cooling Zalman CPNS9900MAX 130mm
Memory G.Skill DDR3-2133, 16gb (4x4gb) @ 9-11-10-28-108-1T 1.65v
Video Card(s) MSI AMD Radeon R9 390 GAMING 8GB @ PCI-E 3.0
Storage 2x120Gb SATA3 Corsair Force GT Raid-0, 4x1Tb RAID-5, 1x500GB
Display(s) 1x LG 27UD69P (4k), 2x Dell S2340M (1080p)
Case Antec 1200
Audio Device(s) Onboard Realtek® ALC898 8-Channel High Definition Audio
Power Supply Seasonic 1000-watt 80 PLUS Platinum
Mouse Logitech G602
Keyboard Rosewill RK-9100
Software Ubuntu 17.10
Benchmark Scores Benchmarks aren't everything.
#10
Code:
sudo chmod -R 775 /media
Allows me to access the drive and its contents however I ended up modifying it to 777 so I was able to delete my files. Thank you!
You're welcome but make sure you're setting the right permissions to the right directory.

Code:
sudo chown root:root /media
sudo chmod 775 /media
sudo chmod -R 777 /media/Storage
Just make sure /media itself belongs to root and is chmod'ed to 775, even if Storage is 777.