Vyoma
Jan 11 2006, 11:55 AM
| | How to change user of a file or directory? Is it possible for admin?
The problem at hand can be summarized something like this. Say there is a directory and there are files in them:
dir1 +---file1 +---file2 dir2 +---file3 +---file4
dir1, file1, and file2 is owned by 'userx'. dir2, file3, and file4 is owned by 'usery'.
Is it possible for 'userx' to change the ownership of dir2, file3, file4 to his own? OR Is is possible for 'usery' to change the ownership of dir2, file3, file4 to 'userx'? OR Is is possible for admin to change the ownership of dir2, file3, file4 to 'userx'?
If there is any possibility, could you please give me those commands, and any links to the documentation? |
Reply
yordan
Jan 11 2006, 02:48 PM
chown -R oracle dir2 # will make oracle the new owner for "dir2" and recursively all the files and directories and subdirectories and files in subdirectories. just type "man chmod" if you want to have more info. If you want your files belonging both to the oracle user and to the dba group, you type : chown -R oracle.dba dir2 # -R means recursively, oracle.dba means "user oracle and group dba". justy type "ls -lR dir2 " in order to see that everything is like you want. Be careful, if you are not root, this will be a suicide : the files will belong to oracle, and not any more to you, so you will not be able to modify or delete them. Tell us if you need more help. Regards Yordan
Reply
vujsa
Jan 11 2006, 11:58 PM
I assume we are talking about the user 0 issue where when a file or directory is created with a script, the server is the owner of the entity. Basically, the script told the server to create the entity. The real problem is that in order to changed the permissions or ownership of a file, you have to be the owner. Even if the file already has the permission of 777, you cannot change the owner. Since we can't log in as the server, we need to write or use a script that will instruct the server to change the file attributes. I use the Bharat's (Gallery) Cleanup Script to change the files to 777 so I can modify or delete them. This way, you can create a copy of the file which will be owned by you then delete the original. I've had a lot of trouble and no success in attempting to actually change the file's ownership. If anyone fids a better way to deal with files that are owned the the server (user 0) let me know. vujsa
Reply
Vyoma
Jan 12 2006, 06:53 AM
vujsa, it was not a problem where the server created the file and directory, but I understand that problem too. I had to use scripts to change the files that were created by files. A very tedious process, and I would be glad to know if there were any other methods to do the same. yordan, thanks. What you said worked. Thank you very much. Moderators, you may close this topic.
Reply
yordan
Jan 12 2006, 09:53 AM
QUOTE yordan, thanks. What you said worked. You're welcome, Vyoma. Glad to have been helpful. Yordan
Reply
tininho
May 3 2007, 05:58 PM
If you use Joomla, the most convenient way is to go to site - global configuration - server and from there change the directory and file permissions to 0777. Hope this helps.
Reply
Recent Queries:--
change user directory - 38.26 hr back. (1)
-
windows change directory owner - 95.09 hr back. (1)
-
php change group for file - 95.88 hr back. (1)
-
php change user - 94.36 hr back. (3)
-
php change user for file - 101.83 hr back. (1)
-
how to change ownership for a file in oracle - 110.71 hr back. (1)
-
changing file ownership in winxp - 122.57 hr back. (1)
-
windows xp "change user profile directory" -vista - 122.93 hr back. (1)
-
change the owner of a directory in php - 123.52 hr back. (1)
-
change directory of a file in php - 126.01 hr back. (1)
-
change directory owner windows - 130.47 hr back. (1)
-
php change dir - 136.75 hr back. (1)
-
change the user file - 141.58 hr back. (1)
-
php script to change owner - 143.31 hr back. (1)
Similar Topics
Keywords : change, user, file, directory, admin
- Css File Size
(7)
Center Update
Make the center of the page change only (5) This is going to be a little hard to explain so just let me know whats confusing you. Ok I'm
making an online game and i will have a banner on top and have all the page links on the left and
have other options on the right and when ever you click one of these links i want it to open in the
center of the page and want the rest of the page to look the same. In other words i want the page
layout the same and what ever page you go to open in the center which will also be in a box/table.
How could i do this. I know it's possible because I've seen it on many other ....
User Account Control
(13) I'm sure most of you know about Windows Vista's User Account Control. I was wondering if
there were any registry settings or anything that I could modify to force the UAC prompt to appear
when doing these tasks: Clicking the Start button Opening any folder Launching any application
Adjusting personalization settings Opening a new page in Internet Explorer (by that I mean typing
in a URL, from Favourites or by clicking a link) Turning off, sleep or restarting the computer
Modifying the Windows Sidebar Opening any file (mp3, document, anything) There's....
Joomla Template Kit Extension For Nvu/composer
help in understanding how to change html template to joomla (3) Hi Everyone, I am becoming quite (a lot) interested in designing with joomla, and need an
understanding of how to use the template kit extension in Nvu/Composer. There doesn't appear to
be any tutorials available on how to use a HTML template to insert and design with joomla modules.
Is there anyone who could shed some light on this subject. It would be MUCH appreciated.....
Astahost Is Dead
Still trying to contact Admin (10) Dear AstaHost... I voted for you. Out of all the other candidates, I said "AstaHost is the
smartest. I'll put them in charge of my website. They hold lots of promise." But since then,
AstaHost, you've broken your election promise. Yes. Broken. Remember when you said...
QUOTE(QpaQue @ Jan 24 2005, 12:39 AM) Unlike our competitors, WE DO NOT :- 5> Take long
time to approve accounts. Well, I've been waiting for longer than a week now to get my
account activated. Unlike other members, I read the rulebook. I contributed to have 30 credits well....
Domain Change.
(10) I used the website (forgot the name) to change http://www.gamingplanet.astahost.com to
www.gamingplanet.org. It said Domain Changed successfully, but when I tried it it doesn't work.
I'm not sure if the domain just needs time to load, so I'll post again in a day or two if it
still doesn't work. -Maxfelgar.....
Yahoo! Messenger Power User
(1) I just received a very weird message when I logged into Messenger today. It said “Congratulations,
you are a Power User!” The pop-up was in its separate window similar to the annoying Insider
and had a Learn More, Choose Your Icon, and No Thanks button (the Learn More button didn’t work).
After doing a quick Google search
(http://help.yahoo.com/l/us/yahoo/messenger/messenger9/pwrusr/pwrusr-01.html)
(http://messenger.yahoo.com/powerusers) I found that this thing does really exist and wasn’t some ad
pop-up that somehow got past my defenses. Here are a few of the “b....
How To: Display A Members/user List.
With PHP, Mysql, and HTML. (3) Alright, some of you might want to display your User's or Members on your site. Notes: 1.This
is to fit in with Feelay's register and Log-in scripts you can find in the tutorial section. 2.I
made this to show the members of my site who is a member and what their ID is. First off, we must
set up a connection to our MySQL Database. CODE <?php $con =
mysql_connect("localhost","database_username","database_username_password
4;); if (!$con) { die('Could not connect: ' .
mysql_error(....
Access Denied As Admin On Xp, Services Troubles
(4) I've had an access denied message on various things, like ending services. Other services (Also
anti-virus/non-m$) take a long time to end, or reset themselves to Automatic when I set
Disabled/Manual. Panda and Webroot Spy Sweeper re-add themselves to Services and startup even when
I delete them with HJT. I'd be happy to unistall them if I knew of better AV, which doesn't
need any startup items......
Mysql And User File_priv
(0) HI, I've hit the grain while trying to import file to mysql database - I need to enable file
permissions of the database user but this seems not possible with most of the hosting providers.
The problem is to set file_priv of the database user to "Y" . This is done in the "user" table of
the maintanance database named "mysql". cPanel doesn't allow this. Via the cPanel you can only
allow privileges on table querries but you cannot grant host file privileges to the database user -
which makes querries like: "LOAD DATA INFILE 'filename' INTO TABLE tablen....
Need To Edit A Wav File [solved]
can you recommend me a free software ? (1) Hi, For ringtone purposes, I need a wav file smaller than 2 megs. This means editing my favourite
song, and shorten the wav file to the first seconds of the intro in order to be less than 2 megs.
Could you please recommend me a soft able to do that ? Easy to use and free if possible ? Or a
commercial one having a trial version ? Thanks in advance Yordan ------------------ Edit : OK,
Audacity did perfectly the job. I leave this post here, maybe this info could be useful for somebody
else.....
How To Create A "user Profile" Page.
No design (easy to add later if you want). (14) Hi! It was a long time ago I created a tutorial, so I've decided to create a new one
/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /> This time, I am
going to teach you, how to create a "user profile page". Lets say I am logged in on my account, and
want to view someone else account information (in this case, only his username, but you can add more
things later). Then I'll press on a link, that will take me to his user profile. But before
you can do that, you will have to create a register script, and a login script. If y....
How To Copy File & Folders From Linux To Windows?.
(12) Many face problem while transfering file from Linux to windows and Vise versa. My solution for
this is "winscp405". Winscp is a windows freeware tool used to copy file from & to Linux machine.
To get this tool just google for " winscp405" tool and download this small package and install.
Enjoy working with Linux and windows /tongue.gif" style="vertical-align:middle" emoid=":P"
border="0" alt="tongue.gif" />....
Is A Php File Searchable?
(8) Hi, I have made my web site solely stored in a SQL database...that will say if I need to load a
page I take it our from the data base and then display it. My question is: is any searcg engine
able to ``crawl'' into my web site content? I would appreciate some info so that I
can change the way my web works. ....
How To Change Your Ip Address.
In Less Than one Minute, Change Your Ip! (68) 1. Click on "Start" in the bottom left hand corner of screen 2. Click on "Run" 3. Type in "command"
and hit ok You should now be at an MSDOS prompt screen. 4. Type "ipconfig /release" just like
that, and hit "enter" 5. Type "exit" and leave the prompt 6. Right-click on "Network Places" or "My
Network Places" on your desktop. 7. Click on "properties" You should now be on a screen with
something titled "Local Area Connection", or something close to that, and, if you have a network
hooked up, all of your other networks. 8. Right click on "Local Area Connection" and clic....
Need Help Urgently (missing Or Corrupt Hal.dll File).
(6) I attempted to boot up my younger brothers computer dismorning, only to be greeted by an error in
white texton a black screen (before windows starts up) claiming that hal.dll was missing or corrupt.
I am not entirely sure what happened, but my searches have lead me to believe that my little sister
may have accidentaly edited the boot.ini file (hopefully not removing it's contents as I
don't remember how I set it up when I had trouble last time). I am wondering if anyone knows of
a simple single floppy boot disk that I could use to edit text files on the drive s....
Deleting A Corrupt File
Cannot delete a corrupt file on Windows XP... (26) I was upgrading some software and came across a corrupt file that halted the installation process. I
went to see what was wrong with the file, and failed to manually delete it. I tried moving
(cut&paste) it to another location, and the installation succeeded. However, the file is still on my
drive, taking up a KB of space. I know that's not a lot, but where am I supposed to put it? In a
folder created especially for all the corrupt files on my computer? /blink.gif"
style="vertical-align:middle" emoid=":blink:" border="0" alt="blink.gif" /> I've heard
something....
Need To Hack An Admin Account On Xp... No Problem!
It's so easy to hack an account you'll be amazed (61) Well recently one of my good girl that is a friend got a laptop from her dad. Her dad does websites
so the laptop was new and worked fine, but needed to be defraged. The one problem, her nor her dad
knew the admin password. I told her to post her question on Trap 17 and it got answered with in
minutes. All you have to do is these few steps: 1. Reboot 2. Before the windows logo comes up press
F11 (Just start clicking it over and over again until the windows logo comes up.) 3. Just sit and
let it do it's thing and when the login screen comes up click on the Admin icon....
How Do You Use The cPanel File Manager?
How to use File Manager? (14) I feel stupid for asking this but I can’t figure out how to use file manager. How do you
open folders and view the file in it? When I click on a certain folder the options does not include
opening it. And can you upload file from the file manager? I’ve been using FTP to manage my
files so far. ....
Get User Input From Vbscript For Batch Files
Get user input from vbscript (2) Hello, I didn't see a tutorial on this subject so i'll go ahead and do it. Long ago I used
batch file programming a quite a bit. I used vbscript files to get user input for the batch files.
So here is a simple example of using the 'call' command to call for the vbscript file which
should be in the same folder as the .bat file. in the batch file pretty much anywhere you can start
the vbscript, and call another .bat file- using @ to of course not echo the line of code - CODE
@ start /w wscript.exe userin.vbs @ call ~anyname.bat @ del ~anyname.bat....
You Cannot Create A File Named Con
(9) did you know, that on MS Word, you cannot name a document con? nobody can figure out why!
....
Super File Recover
(3) SUPERFileRecover 3.0.0.1052 SUPERFileRecover can recover deleted Files, Documents, Spreadsheets,
Pictures, Movies, and Music easy! SUPERFileRecover utilizes read-only scanning so that the data
on your drive remains intact no matter how many times you scan and attempt recovery! SUPER
File Recove features When a file is deleted the file may still exist on the drive from which it
was deleted even if you have emptied the recycle bin. With SUPERFileRecover you can often recover
the entire file completely intact, saving hours of work reproducing a document, red....
How To Use Psd File
(14) I'm redesigning my website, and I found a template for it that is in a PSD format. I have Adobe
Photoshop so I can open it and edit it. I changed the text and images exactly the way I want it, but
what do I do from here? How do I get the images and text from the PSD to the individual files that
makes it up? Or am I supposed to be doing that at all? Thanks....
Disable /change The Find In Page Sound In Firefox
(1) How to disable or change the "find in page" sound in Mozilla FireFox Just as you know,by pressing
Ctrl-F, the find bar appears at the bottom of the Firefox Window, you can disable or change the
"find in page" sound. 1- run Mozilla FireFox and type “about:config” (without quotes ) in the
address bar and press ENTER to open Mozilla FireFox configuration. 2- Type” typeahead” (without
quotes ) in the filter field to filter options 3- To disable this ability, double-click on “
accessibility.typeaheadfind.enablesound “option to disable it. The line will turn bold , it mean....
Uploading Image File Through JSP Code To Server
(9) I have to upload images from client side to server side, without using input tag or browseing of
file. I know the absolute path of file in client side. And that file I want to shift to server with
JSP code or any servlet code. I have done uploading through servlet to the server with input tag
and type is file . Servlet code : CODE import com.oreilly.servlet.MultipartRequest;
import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; public
class UploadPhoto extends HttpServlet { public void doPost(HttpServletRequest req....
Recover Tables From A MySQL .frm File
(8) I have a couple of .frm files with no corresponding data or index files. Is it possible to recover
the table structure (field names, types, sizes, rows,col, etc) from these files? The table type is
innodb....
Counter With Img In Flat File
(2) this is a counter with images and stor in flat file becouse i can not upload .zip .rar file iwell
program it on this post at frist you need to 2 files count.php count.txt and you need else make
folder has name gifs and make 10 pictuer 10 file 0.gif to 9.gif now all ok open the count.php and
add this code CODE <? ### IMAGE FORMAT $format = ".gif"; $file =
file("count.txt"); $num = ($file[0] + 1);
exec("echo $num > count.txt"); switch($type) { case "....
How To Save A Image In Pdf File And Download It?
Programming script need hepl. (10) Can anyone tell how to save an image into a PDF file and download it without need to save it on the
server? Thanks. All sugesstions are welcome! Wrong section. Topic moved to Software >
Graphics & Web Design. ....
How To Change Registered Owner`s Name On Win Xp
(21) How to change registered owner`s name on Win XP 1- Run regedit 2- Find and go to below key:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\Current Version 3-Change your
name in following subkey :Registered Owner Be successful!....
How To Change Ur Ip Address
(47) I've tried this on both Windows XP and Windows 2000, and it has worked: 1. Click on "Start"
in the bottom left hand corner of screen 2. Click on "Run" 3. Type in "command" and hit ok You
should now be at an MSDOS prompt screen. 4. Type "ipconfig /release" just like that, and hit
"enter" 5. Type "exit" and leave the prompt 6. Right-click on "Network Places" or "My Network
Places" on your desktop. 7. Click on "properties" You should now be on a screen with something
titled "Local Area Connection", or something close to that, and, if you have a network hooked u....
Looking for change, user, file, directory, admin
|
*RANDOM STUFF*
*SIMILAR VIDEOS*
Searching Video's for change, user, file, directory, admin
|
advertisement
|
|