Ask Question Forum:
Model Library:2025-02-08 Updated:A.I. model is online for auto reply question page
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by Mark_Co
at 2024-04-11 21:20:38
Point:500 Replies:4 POST_ID:828916USER_ID:10
Topic:
PHP Scripting Language;Linux;Scripting Languages
I am trying to delete a file using rm -rf first.php and i keep getting this error:
Can someone please tell me how to remove the file? Thanks.
Assisted Solution
Expert: skullnobrains replied at 2024-04-13 08:53:19
125 points EXCELLENT
++Gerwind : being root or toying with access rights will not make a difference if the filesystem is mounted read-only
you can easily find the mountpoint using "df filename" and mount options using the mount command without arguments.
if you want to go the lazy way, copy-paste this
you can easily find the mountpoint using "df filename" and mount options using the mount command without arguments.
if you want to go the lazy way, copy-paste this
you may or may not be able to remount the filesystem read-write ( -o rw ) depending on the circumstances. for example a cd will not be mountable rw.
Assisted Solution
Expert: Gerwin Jansen replied at 2024-04-12 00:05:05
125 points EXCELLENT
The file you are trying to delete is on a read only file system. Looks like it's on a SAN/NFS location that has been mounted read-only.
Look up the folder where the file resides with "ls -l", then verify with "mount" where that folder is mounted. You either have to re-mount that folder as read-write or (s)ftp to the SAN/NFS location and delete the file there.
Look up the folder where the file resides with "ls -l", then verify with "mount" where that folder is mounted. You either have to re-mount that folder as read-write or (s)ftp to the SAN/NFS location and delete the file there.
Assisted Solution
Expert: duncanb7 replied at 2024-04-11 22:37:31
125 points EXCELLENT
using linux command, ls -la first.php you can see the group and owner of the file.
If you have root account and password to access (su root or su on your login shell)
You can use root account and passwd to delete it.
Or you can do it first (change group and owner of the file)
chgrp -R -v youraccount first.php
chown -R -v youraccount first.php
And then delete it
Be reminded, using your account to ftp, putty send (pscp.exe), edit,create,write, read or delete the first.php or New file which is owned by your account
Duncan
If you have root account and password to access (su root or su on your login shell)
You can use root account and passwd to delete it.
Or you can do it first (change group and owner of the file)
chgrp -R -v youraccount first.php
chown -R -v youraccount first.php
And then delete it
Be reminded, using your account to ftp, putty send (pscp.exe), edit,create,write, read or delete the first.php or New file which is owned by your account
Duncan
Accepted Solution
Expert: omarfarid replied at 2024-04-11 21:27:54
125 points EXCELLENT
If you are not the owner of the file or the dir in which the file is in then you can not delete it.
Run the script as root,
Run the script as root,