You are not logged in.
I copied my backed up projects (mainly java) from a cdrom. Now all the directories inside have wrong permissions (not writable).
Even if I changed the permissions to +w I cannot delete or create files in them. There are many directories. I copied with mc (F5).
Am I making any mistake ? How should I copy them back ?
regards,
Hardik
Offline
ls -l a file as an example and paste the result here
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
If I create the folder and copy other files inside, it works. But still I have to change the permission (+w). Can I copy with default umask ? Should I change something in fstab ?
Here the output ..
[hardik@moonlight: workspace ]$ ll ~/projects/jsf/HelloJsf
total 76
-r--r--r-- 1 hardik hardik 3370 Aug 30 21:16 HelloJsf.iml
-r--r--r-- 1 hardik hardik 17522 Aug 30 21:16 HelloJsf.ipr
-r--r--r-- 1 hardik hardik 38757 Sep 12 10:04 HelloJsf.iws
-r--r--r-- 1 hardik hardik 2139 Aug 30 21:17 pom.xml
dr-xr-xr-x 3 hardik hardik 4096 Aug 29 07:30 src/
dr-xr-xr-x 7 hardik hardik 4096 Aug 30 22:00 target/
[hardik@moonlight: workspace ]$ ln -sv ~/projects/jsf/HelloJsf .
`./HelloJsf' -> `/home/hardik/projects/jsf/HelloJsf'
[hardik@moonlight: workspace ]$ cd HelloJsf
[hardik@moonlight: HelloJsf ]$ mvn clean install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building HelloJsf Maven Webapp
[INFO] task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] Deleting directory /home/hardik/projects/jsf/HelloJsf/target
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to delete directory: /home/hardik/projects/jsf/HelloJsf/target. Reason: Unable to delete file /home/hardik/projects/jsf/HelloJsf/target/HelloJsf.war
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Thu Dec 24 20:58:54 CET 2009
[INFO] Final Memory: 4M/9M
[INFO] ------------------------------------------------------------------------
[hardik@moonlight: HelloJsf ]$ ll
total 76
-r--r--r-- 1 hardik hardik 3370 Aug 30 21:16 HelloJsf.iml
-r--r--r-- 1 hardik hardik 17522 Aug 30 21:16 HelloJsf.ipr
-r--r--r-- 1 hardik hardik 38757 Sep 12 10:04 HelloJsf.iws
-r--r--r-- 1 hardik hardik 2139 Aug 30 21:17 pom.xml
dr-xr-xr-x 3 hardik hardik 4096 Aug 29 07:30 src/
dr-xr-xr-x 7 hardik hardik 4096 Aug 30 22:00 target/
[hardik@moonlight: HelloJsf ]$ chmod -v +w -R .
Offline
yes, and I want to change that with the last command ... it works .. but I want to avoid changing the permissions...
Offline
try:
sudo chmod -R o+w [insert name of top directory here]
It should recursively change the permission for all files in the directory such that "other" has write privilege. BE SURE you are acting only on the directory you want to change.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
That's to be expected, read only medium yields read only files, even after copying to a rw medium.
I would suggest chmod -R u+w instead of chmod -R o+w, the owner (you) is the one that needs write permission not everyone else .
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
thanks,
that fixed it.
Offline
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
That's to be expected, read only medium yields read only files, even after copying to a rw medium.
I would suggest chmod -R u+w instead of chmod -R o+w, the owner (you) is the one that needs write permission not everyone else .
This is linux flaw, but you can run real backup to preserve ACL
Last edited by broch (2009-12-25 18:20:13)
Offline