LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-16-2010, 05:27 AM   #1
Mr Pink
LQ Newbie
 
Registered: Dec 2008
Posts: 23

Rep: Reputation: 0
Permission denied on new partition


Hi,

I have created a new partition

/dev/cciss/c0d0p2 8489 17709 74067682+ 83 Linux

I formatted it with

mkfs.ext3 /dev/cciss/c0d0p2

Labelled it

e2label /dev/cciss/c0d0p2 /data

then mounted it

LABEL=/data /data ext3 defaults 1 1

I changed the owner:group to will:will on data

chown -R will:will /data

but when I try and access it I get a permission denied

will@node:/data$ ls
ls: cannot open directory .: Permission denied

Has anyone got any ideas on what it could be? I have never had this happen before

Distributor ID: Ubuntu
Description: Ubuntu 8.04.3 LTS
Release: 8.04
Codename: hardy

Thanks,
Will
 
Old 04-16-2010, 06:33 AM   #2
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
You've put that in fstab
Have you mounted it ?

mount /data
 
Old 04-16-2010, 08:28 AM   #3
Mr Pink
LQ Newbie
 
Registered: Dec 2008
Posts: 23

Original Poster
Rep: Reputation: 0
Yeah I have mounted it manually and then added it to fstab both with no luck
 
Old 04-16-2010, 08:58 AM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
What is the output of
Code:
df -hT
/bin/ls -ld /data
/bin/ls -l /data
grep 'c0d0p2' /etc/fstab
 
Old 04-16-2010, 10:10 AM   #5
Mr Pink
LQ Newbie
 
Registered: Dec 2008
Posts: 23

Original Poster
Rep: Reputation: 0
It is

root@server:/# df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/cciss/c0d0p1
ext3 65G 52G 9.4G 85% /
varrun tmpfs 1.5G 72K 1.5G 1% /var/run
udev tmpfs 1.5G 56K 1.5G 1% /dev
/dev/cciss/c0d0p2
ext3 71G 180M 67G 1% /data

root@server:/# ls -ld /data
drw-rw---- 2 will will 4096 2010-04-16 10:53 /data

root@edge-aspire:/data# ls -l /data/
total 0

(I removed stuff I created with root)

root@server:~# grep -a1 'c0d0p2' /etc/fstab
# /dev/cciss/c0d0p2
LABEL=/data /data ext3 defaults 1 1

I am totally stumped?

Will
 
Old 04-16-2010, 10:44 AM   #6
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Unmount it. What are the permissions now on /data ?
 
Old 04-16-2010, 10:49 AM   #7
Mr Pink
LQ Newbie
 
Registered: Dec 2008
Posts: 23

Original Poster
Rep: Reputation: 0
ahh interesting

drwxr-xr-x 2 root root 4.0K 2010-04-15 12:33 data
 
Old 04-16-2010, 10:56 AM   #8
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by Mr Pink View Post
root@server:/# ls -ld /data
drw-rw---- 2 will will 4096 2010-04-16 10:53 /data
There's the problem; directories require x permission to make them listable/searchable.
 
Old 04-16-2010, 11:12 AM   #9
Mr Pink
LQ Newbie
 
Registered: Dec 2008
Posts: 23

Original Poster
Rep: Reputation: 0
That's strange, it has worked but I am still stumped on why you need execute permissions to make it listable/searchable
 
Old 04-16-2010, 11:17 AM   #10
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
That's how it's defined.
 
Old 04-16-2010, 12:35 PM   #11
Mr Pink
LQ Newbie
 
Registered: Dec 2008
Posts: 23

Original Poster
Rep: Reputation: 0
Fair enough, the reason I created the partition was to move Mysql's datadir which I have done but when I start it with mysqld I get

root@edge-aspire:/data# mysqld
100416 18:30:47 [Warning] Can't create test file /data/edge-aspire.lower-test
100416 18:30:47 [Warning] Can't create test file /data/edge-aspire.lower-test
100416 18:30:47 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.

which I presume is another permissions issue but I have the permissions to mysql:mysql so it's possibly not?

Thanks for all your help most appreciated,

Will
 
Old 04-16-2010, 12:41 PM   #12
Mr Pink
LQ Newbie
 
Registered: Dec 2008
Posts: 23

Original Poster
Rep: Reputation: 0
Just to add

root@server:/data# ls -lcd
drwxrwx--- 9 mysql mysql 4096 2010-04-16 18:34 .

root@server:/data# ls -lah
total 45G
drwxrwx--- 9 mysql mysql 4.0K 2010-04-16 18:34 .
drwxr-xr-x 27 root root 4.0K 2010-04-16 16:48 ..
drwxrwx--- 2 mysql mysql 4.0K 2010-04-16 17:07 database1
drwxrwx--- 2 mysql mysql 4.0K 2010-04-16 17:07 database2
drwxrwx--- 2 mysql mysql 4.0K 2010-04-16 17:07 database3
drwxrwx--- 2 mysql mysql 4.0K 2010-04-16 17:07 database5
drwxrwx--- 2 mysql mysql 4.0K 2010-04-16 17:07 database6
drwxrwx--- 2 mysql mysql 4.0K 2010-04-16 17:07 database7
-rwxrwx--- 1 mysql mysql 0 2010-04-16 17:07 debian-5.0.flag
-rwxrwx--- 1 mysql mysql 45G 2010-04-16 17:42 ibdata1
-rwxrwx--- 1 mysql mysql 5.0M 2010-04-16 17:42 ib_logfile0
-rwxrwx--- 1 mysql mysql 5.0M 2010-04-16 17:42 ib_logfile1
-rwxrwx--- 1 mysql mysql 52 2010-04-16 17:42 master.info
drwxrwx--- 2 mysql mysql 4.0K 2010-04-16 17:42 mysql
-rwxrwx--- 1 mysql mysql 148 2010-04-16 17:42 mysqld-relay-bin.000001
-rwxrwx--- 1 mysql mysql 148 2010-04-16 17:42 mysqld-relay-bin.000002
-rwxrwx--- 1 mysql mysql 148 2010-04-16 17:42 mysqld-relay-bin.000003
-rwxrwx--- 1 mysql mysql 148 2010-04-16 17:42 mysqld-relay-bin.000004
-rwxrwx--- 1 mysql mysql 2.3K 2010-04-16 17:42 mysqld-relay-bin.index
-rwxrwx--- 1 mysql mysql 7 2010-04-16 17:42 mysql_upgrade_info
-rwxrwx--- 1 mysql mysql 55 2010-04-16 17:42 relay-log.info

Thanks,
Will
 
  


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
samba shared win box partition permission denied matters Slackware 8 04-11-2009 02:22 AM
Installed slackware-try to access FAT32 file partition-permission denied-? linus72 Slackware 10 03-23-2009 08:23 AM
/bin/bash: permission denied(after / partition moved) xbuffalo Linux - General 7 06-19-2008 01:18 AM
Help Me!! I can't write to a mounted (ext3) partition - permission denied!! goja Linux - Newbie 4 12-28-2007 04:54 AM
Permission denied to a partition jaen Linux - Newbie 12 05-20-2007 07:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:55 AM.

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