file can not be deleted

  • Follow


Hello,

I'm installing a new virtual server and in my /etc/mysql path is a file 
my.cnf stored, which is not accessable with the root- user. A ls -l 
shows

ls: cannot access /etc/mysql/my.cnf: No such file or directory
total 16
drwxr-xr-x 2 root root 4096 Oct 27 15:25 conf.d
-rwxr-xr-x 1 root root 1198 Jul 20  2010 debian-start
-rw------- 1 root root  333 Jul 20  2010 debian.cnf
?????????? ? ?    ?       ?            ? my.cnf

How can I remove the my.cnf ?
rm, touch shows "No such file or directory"

Thanks

Phil

0
Reply philipp.kraus (153) 10/27/2011 2:54:53 PM

On Thursday 27 October 2011 16:54, Philipp Kraus conveyed the following 
to comp.os.linux.misc...

> Hello,
> 
> I'm installing a new virtual server and in my /etc/mysql path is a
> file my.cnf stored, which is not accessable with the root- user. A ls
> -l shows
> 
> ls: cannot access /etc/mysql/my.cnf: No such file or directory
> total 16
> drwxr-xr-x 2 root root 4096 Oct 27 15:25 conf.d
> -rwxr-xr-x 1 root root 1198 Jul 20  2010 debian-start
> -rw------- 1 root root  333 Jul 20  2010 debian.cnf
> ?????????? ? ?    ?       ?            ? my.cnf
> 
> How can I remove the my.cnf ?
> rm, touch shows "No such file or directory"

Looks like a damaged filesystem to me, and repairing the filesystem 
would probably get rid of that "ghost file".  Had any power outages or 
other unclean shutdowns lately?  See any weird messages about the hard 
disk or disk controller in the output of dmesg or in 
"/var/log/messages"?

What does...

	ls -li /etc/mysql/

.... say?

(Hint: The first column will show the inode number for each entry.)

-- 
= Aragorn =
(registered GNU/Linux user #223157)
0
Reply stryder2 (284) 10/27/2011 3:03:40 PM


On 2011-10-27 17:03:40 +0200, Aragorn said:

> On Thursday 27 October 2011 16:54, Philipp Kraus conveyed the following
> to comp.os.linux.misc...
> 
>> Hello,
>> 
>> I'm installing a new virtual server and in my /etc/mysql path is a
>> file my.cnf stored, which is not accessable with the root- user. A ls
>> -l shows
>> 
>> ls: cannot access /etc/mysql/my.cnf: No such file or directory
>> total 16
>> drwxr-xr-x 2 root root 4096 Oct 27 15:25 conf.d
>> -rwxr-xr-x 1 root root 1198 Jul 20  2010 debian-start
>> -rw------- 1 root root  333 Jul 20  2010 debian.cnf
>> ?????????? ? ?    ?       ?            ? my.cnf
>> 
>> How can I remove the my.cnf ?
>> rm, touch shows "No such file or directory"
> 
> Looks like a damaged filesystem to me, and repairing the filesystem
> would probably get rid of that "ghost file".  Had any power outages or
> other unclean shutdowns lately?

I Think also but this file exists after I create the virtual machine from the
images of my distributer, so the file is within the image


>  See any weird messages about the hard
> disk or disk controller in the output of dmesg or in
> "/var/log/messages"?
> 
> What does...
> 
> 	ls -li /etc/mysql/
> 
> ... say?

Shows the list with:
ls: cannot access my.cnf: No such file or directory
total 16
131045730 drwxr-xr-x 2 root root 4096 Oct 27 15:25 conf.d
131045811 -rwxr-xr-x 1 root root 1198 Jul 20  2010 debian-start
131045822 -rw------- 1 root root  333 Jul 20  2010 debian.cnf
131046035 ?????????? ? ?    ?       ?            ? my.cnf
131045834 -rw-r--r-- 1 root root 3564 Feb 10  2011 my.cnf.dpkg-new

Thx
Phil

0
Reply philipp.kraus (153) 10/27/2011 3:34:01 PM

On 2011-10-27, Philipp Kraus wrote:
> Hello,
>
> I'm installing a new virtual server and in my /etc/mysql path is a file 
> my.cnf stored, which is not accessable with the root- user. A ls -l 
> shows
>
> ls: cannot access /etc/mysql/my.cnf: No such file or directory
> total 16
> drwxr-xr-x 2 root root 4096 Oct 27 15:25 conf.d
> -rwxr-xr-x 1 root root 1198 Jul 20  2010 debian-start
> -rw------- 1 root root  333 Jul 20  2010 debian.cnf
> ?????????? ? ?    ?       ?            ? my.cnf
>
> How can I remove the my.cnf ?
> rm, touch shows "No such file or directory"

rm /etc/mysql/*my.cnf*

-- 
   Chris F.A. Johnson, <http://cfajohnson.com>
   Author:
   Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress)
   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
0
Reply cfajohnson (1783) 10/27/2011 4:49:40 PM

Philipp Kraus wrote:
> On 2011-10-27 17:03:40 +0200, Aragorn said:
> 
>> On Thursday 27 October 2011 16:54, Philipp Kraus conveyed the following
>> to comp.os.linux.misc...
>>
>>> Hello,
>>>
>>> I'm installing a new virtual server and in my /etc/mysql path is a
>>> file my.cnf stored, which is not accessable with the root- user. A ls
>>> -l shows
>>>
>>> ls: cannot access /etc/mysql/my.cnf: No such file or directory
>>> total 16
>>> drwxr-xr-x 2 root root 4096 Oct 27 15:25 conf.d
>>> -rwxr-xr-x 1 root root 1198 Jul 20  2010 debian-start
>>> -rw------- 1 root root  333 Jul 20  2010 debian.cnf
>>> ?????????? ? ?    ?       ?            ? my.cnf
>>>
>>> How can I remove the my.cnf ?
>>> rm, touch shows "No such file or directory"
>>
>> Looks like a damaged filesystem to me, and repairing the filesystem
>> would probably get rid of that "ghost file".  Had any power outages or
>> other unclean shutdowns lately?
> 
> I Think also but this file exists after I create the virtual machine 
> from the
> images of my distributer, so the file is within the image
> 
> 
>>  See any weird messages about the hard
>> disk or disk controller in the output of dmesg or in
>> "/var/log/messages"?
>>
>> What does...
>>
>>     ls -li /etc/mysql/
>>
>> ... say?
> 
> Shows the list with:
> ls: cannot access my.cnf: No such file or directory
> total 16
> 131045730 drwxr-xr-x 2 root root 4096 Oct 27 15:25 conf.d
> 131045811 -rwxr-xr-x 1 root root 1198 Jul 20  2010 debian-start
> 131045822 -rw------- 1 root root  333 Jul 20  2010 debian.cnf
> 131046035 ?????????? ? ?    ?       ?            ? my.cnf
> 131045834 -rw-r--r-- 1 root root 3564 Feb 10  2011 my.cnf.dpkg-new
> 
> Thx
> Phil
> 
That looks like a directory entry pointing nowhere to me.

single user and fsck it.
0
Reply tnp (2255) 10/27/2011 5:06:05 PM

On Thursday 27 October 2011 17:34, Philipp Kraus conveyed the following 
to comp.os.linux.misc...

> On 2011-10-27 17:03:40 +0200, Aragorn said:
> 
>> On Thursday 27 October 2011 16:54, Philipp Kraus conveyed the
>> following to comp.os.linux.misc...
>> 
>>> Hello,
>>> 
>>> I'm installing a new virtual server and in my /etc/mysql path is a
>>> file my.cnf stored, which is not accessable with the root- user. A
>>> ls -l shows
>>> 
>>> ls: cannot access /etc/mysql/my.cnf: No such file or directory
>>> total 16
>>> drwxr-xr-x 2 root root 4096 Oct 27 15:25 conf.d
>>> -rwxr-xr-x 1 root root 1198 Jul 20  2010 debian-start
>>> -rw------- 1 root root  333 Jul 20  2010 debian.cnf
>>> ?????????? ? ?    ?       ?            ? my.cnf
>>> 
>>> How can I remove the my.cnf ?
>>> rm, touch shows "No such file or directory"
>> 
>> Looks like a damaged filesystem to me, and repairing the filesystem
>> would probably get rid of that "ghost file".  Had any power outages
>> or other unclean shutdowns lately?
> 
> I Think also but this file exists after I create the virtual machine
> from the images of my distributer, so the file is within the image

Then you must run fsck on the image file, just as if it were a block 
device, and while it is _not_ mounted into the virtual machine or via 
loopback.

>> What does...
>> 
>> ls -li /etc/mysql/
>> 
>> ... say?
> 
> Shows the list with:
> ls: cannot access my.cnf: No such file or directory
> total 16
> 131045730 drwxr-xr-x 2 root root 4096 Oct 27 15:25 conf.d
> 131045811 -rwxr-xr-x 1 root root 1198 Jul 20  2010 debian-start
> 131045822 -rw------- 1 root root  333 Jul 20  2010 debian.cnf
> 131046035 ?????????? ? ?    ?       ?            ? my.cnf
> 131045834 -rw-r--r-- 1 root root 3564 Feb 10  2011 my.cnf.dpkg-new

If the image came from your distributor, then they've probably created 
it off of a corrupted filesystem.  You should bring this matter to their 
attention, because other people may be experiencing the same problem, 
and who knows whatever else the distributor may have screwed up.

-- 
= Aragorn =
(registered GNU/Linux user #223157)
0
Reply stryder2 (284) 10/27/2011 7:37:22 PM

"Chris F.A. Johnson" <cfajohnson@gmail.com> writes:

>> drwxr-xr-x 2 root root 4096 Oct 27 15:25 conf.d
>> -rwxr-xr-x 1 root root 1198 Jul 20  2010 debian-start
>> -rw------- 1 root root  333 Jul 20  2010 debian.cnf
>> ?????????? ? ?    ?       ?            ? my.cnf
>>
>> How can I remove the my.cnf ?
>> rm, touch shows "No such file or directory"
> 
> rm /etc/mysql/*my.cnf*

I would first run fsck on that partition. Chances are something is screwed up.

Vilmos
0
Reply vilmos2 (252) 10/30/2011 7:40:04 AM

On Thu, 27 Oct 2011 12:49:40 -0400, Chris F.A. Johnson wrote:

> On 2011-10-27, Philipp Kraus wrote:
>> Hello,
>>
>> I'm installing a new virtual server and in my /etc/mysql path is a file
>> my.cnf stored, which is not accessable with the root- user. A ls -l
>> shows
>>
>> ls: cannot access /etc/mysql/my.cnf: No such file or directory total 16
>> drwxr-xr-x 2 root root 4096 Oct 27 15:25 conf.d -rwxr-xr-x 1 root root
>> 1198 Jul 20  2010 debian-start -rw------- 1 root root  333 Jul 20  2010
>> debian.cnf ?????????? ? ?    ?       ?            ? my.cnf
>>
>> How can I remove the my.cnf ?
>> rm, touch shows "No such file or directory"
> 
> rm /etc/mysql/*my.cnf*

That might work.  Might also cause him more problems...

Can't explain what is going on here, but I have a similar file on my 
system.  On Fedora 13...

Logged in as me:
$ ls -al
       ....
drwxr-xr-x. 11 kevin kevin    4096 Oct 25 01:18 .gnome2
drwx------.  2 kevin kevin    4096 Aug  4  2010 .gnome2_private
drwxrwxr-x.  2 kevin kevin    4096 Sep  7 16:40 .gstreamer-0.10
-rw-rw-r--.  1 kevin kevin     137 Oct 30 00:54 .gtk-bookmarks
drwxrwxr-x.  2 kevin kevin    4096 Mar 15  2011 guns
dr-x------.  2 kevin kevin       0 Oct 30 00:54 .gvfs
-rw-------.  1 kevin kevin   37836 Oct 30 00:54 .ICEauthority
       ....

Logged in as root:
# ls -al
       ....
drwxr-xr-x. 11 kevin kevin    4096 Oct 25 01:18 .gnome2
drwx------.  2 kevin kevin    4096 Aug  4  2010 .gnome2_private
drwxrwxr-x.  2 kevin kevin    4096 Sep  7 16:40 .gstreamer-0.10
-rw-rw-r--.  1 kevin kevin     137 Oct 30 00:54 .gtk-bookmarks
drwxrwxr-x.  2 kevin kevin    4096 Mar 15  2011 guns
d??????????  ? ?     ?           ?            ? .gvfs
-rw-------.  1 kevin kevin   37836 Oct 30 00:54 .ICEauthority
       ....

That directory, .gvfs, exists on Fedora 15 and Ubuntu 11.04 also, but has 
drwx------. permissions.  Notice how when logged in as user kevin (i.e. 
me), the listing shows up as "normal", but when logged in as root it 
looks "wrong".  Also on Fedora 15 as root, the directory entry appears 
normal with ls -al.  I'm confused...

According to the rpm package:

Description :
The gvfs package provides backend implementations for the gio
framework in GLib. It includes ftp, sftp, cifs.


I can't explain what is happening, nor why.  Just that a directory entry 
like this is NOT necessarily a sign that something is wrong.  Looks like 
it is NOP (Normal Operating Procedure) for some things...
0
Reply kdsnodgrass (120) 10/30/2011 7:49:37 AM

On 10/30/2011 02:49 AM, Kevin Snodgrass wrote:
> On Thu, 27 Oct 2011 12:49:40 -0400, Chris F.A. Johnson wrote:
>
>> On 2011-10-27, Philipp Kraus wrote:
>>> Hello,
>>>
>>> I'm installing a new virtual server and in my /etc/mysql path is a file
>>> my.cnf stored, which is not accessable with the root- user. A ls -l
>>> shows
>>>
>>> ls: cannot access /etc/mysql/my.cnf: No such file or directory total 16
>>> drwxr-xr-x 2 root root 4096 Oct 27 15:25 conf.d -rwxr-xr-x 1 root root
>>> 1198 Jul 20  2010 debian-start -rw------- 1 root root  333 Jul 20  2010
>>> debian.cnf ?????????? ? ?    ?       ?            ? my.cnf
>>>
>>> How can I remove the my.cnf ?
>>> rm, touch shows "No such file or directory"
>>
>> rm /etc/mysql/*my.cnf*
>
> That might work.  Might also cause him more problems...
>
> Can't explain what is going on here, but I have a similar file on my
> system.  On Fedora 13...
>
> Logged in as me:
> $ ls -al
>         ....
> drwxr-xr-x. 11 kevin kevin    4096 Oct 25 01:18 .gnome2
> drwx------.  2 kevin kevin    4096 Aug  4  2010 .gnome2_private
> drwxrwxr-x.  2 kevin kevin    4096 Sep  7 16:40 .gstreamer-0.10
> -rw-rw-r--.  1 kevin kevin     137 Oct 30 00:54 .gtk-bookmarks
> drwxrwxr-x.  2 kevin kevin    4096 Mar 15  2011 guns
> dr-x------.  2 kevin kevin       0 Oct 30 00:54 .gvfs
> -rw-------.  1 kevin kevin   37836 Oct 30 00:54 .ICEauthority
>         ....
>
> Logged in as root:
> # ls -al
>         ....
> drwxr-xr-x. 11 kevin kevin    4096 Oct 25 01:18 .gnome2
> drwx------.  2 kevin kevin    4096 Aug  4  2010 .gnome2_private
> drwxrwxr-x.  2 kevin kevin    4096 Sep  7 16:40 .gstreamer-0.10
> -rw-rw-r--.  1 kevin kevin     137 Oct 30 00:54 .gtk-bookmarks
> drwxrwxr-x.  2 kevin kevin    4096 Mar 15  2011 guns
> d??????????  ? ?     ?           ?            ? .gvfs
> -rw-------.  1 kevin kevin   37836 Oct 30 00:54 .ICEauthority
>         ....
>
> That directory, .gvfs, exists on Fedora 15 and Ubuntu 11.04 also, but has
> drwx------. permissions.  Notice how when logged in as user kevin (i.e.
> me), the listing shows up as "normal", but when logged in as root it
> looks "wrong".  Also on Fedora 15 as root, the directory entry appears
> normal with ls -al.  I'm confused...

The .gvfs directory is special.  If you look at the output from the
'mount' command (with no arguments), you'll see that there is a
gvfs-fuse-daemon pseudo-filesystem mounted there.  That file system
can be accessed only by the owner.  Even root cannot stat() the
inode.  There was probably a "Permission denied" message produced
when you tried that as root.

-- 
Bob Nichols         AT comcast.net I am "RNichols42"
0
Reply SEE_SIGNATURE1 (213) 10/30/2011 2:06:43 PM

On Sun, 30 Oct 2011 09:06:43 -0500, Robert Nichols wrote:
> The .gvfs directory is special.  If you look at the output from the
> 'mount' command (with no arguments), you'll see that there is a
> gvfs-fuse-daemon pseudo-filesystem mounted there.  That file system can
> be accessed only by the owner.  Even root cannot stat() the inode. 
> There was probably a "Permission denied" message produced when you tried
> that as root.

All true.  But I still don't understand what this does, nor what it's 
purpose in life is...  "vfs" is obviously "virtual file system"...

Is this something to make Linux more "winders-y" ?
0
Reply kdsnodgrass (120) 10/30/2011 6:19:56 PM

Kevin Snodgrass <kdsnodgrass@yahoo.com> writes:
> On Sun, 30 Oct 2011 09:06:43 -0500, Robert Nichols wrote:

>> The .gvfs directory is special.  If you look at the output from the
>> 'mount' command (with no arguments), you'll see that there is a
>> gvfs-fuse-daemon pseudo-filesystem mounted there.  That file system
>> can be accessed only by the owner.  Even root cannot stat() the
>> inode.  There was probably a "Permission denied" message produced
>> when you tried that as root.
>
> All true.  But I still don't understand what this does, nor what it's 
> purpose in life is...  "vfs" is obviously "virtual file system"...

It allows use of GVFS[1] outside of the Gnome libraries.

It's almost certainly a red herring regarding the original question,
which is most likely due to a corrupted filesystem.

  [1] http://en.wikipedia.org/wiki/GVFS

> Is this something to make Linux more "winders-y" ?

No.

-- 
http://www.greenend.org.uk/rjk/
0
Reply rjk (492) 10/30/2011 6:54:40 PM

"Chris F.A. Johnson" <cfajohnson@gmail.com> writes:
> On 2011-10-27, Philipp Kraus wrote:

>> I'm installing a new virtual server and in my /etc/mysql path is a file 
>> my.cnf stored, which is not accessable with the root- user. A ls -l 
>> shows
>>
>> ls: cannot access /etc/mysql/my.cnf: No such file or directory
>> total 16
>> drwxr-xr-x 2 root root 4096 Oct 27 15:25 conf.d
>> -rwxr-xr-x 1 root root 1198 Jul 20  2010 debian-start
>> -rw------- 1 root root  333 Jul 20  2010 debian.cnf
>> ?????????? ? ?    ?       ?            ? my.cnf
>>
>> How can I remove the my.cnf ?
>> rm, touch shows "No such file or directory"
>
> rm /etc/mysql/*my.cnf*

Adding in pointless wildcard characters will not make it any more
deletable.

-- 
http://www.greenend.org.uk/rjk/
0
Reply rjk (492) 10/30/2011 6:55:29 PM

11 Replies
48 Views

(page loaded in 0.136 seconds)

Similiar Articles:


















7/16/2012 8:56:42 AM


Reply: