Creating Directories and Files

I am trying to create directories and sub-directories in a portlet. The user names the File and directories and sub-directories with specific files in each are generated. I can see that it is getting the correct paths for the directories and sub but it will not create the actual directories or files when I do fileName.createNewFile() or fileName.mkdir() as appropriate. Any insight would be greatly appreciated.

So do you "greatly appreciate" my potentially helpful response yet? Did you get run over by a bus?
Oh, I understand now. To you, "to greatly appreciate" means "to ignore".
*BURP*
(P.S. that might mean "You're welcome", but I likewise leave it to you to interpret)

Similar Messages

  • Having a hard time with permissions to create dir and files in www

    Having a hard time getting permissions to create directories and files in www folder:
    I followed the following guide here: https://www.digitalocean.com/community/ … arch-linux and here: https://www.digitalocean.com/community/ … arch-linux
    So now I have a LEMP stack which runs fine and I have my root account secured and a new username "adriano". If I SFTP into the server using the username adriano, I am unable to create any files or directories. Trying to do a simple wordpress install doesn't work because I need to be able to create a folder for it, and a wp-config.php file. Both of which, like I mentioned, I do not have permissions to do. Yes, the username "adriano" has been added to the sudoers file via visudo.
    I've never been very good at UNIX permissions so I was wondering if maybe someone can help me out?
    Also, since I am using nginx it does not seem like I have a www-data group or user and my www folder is /usr/share/nginx/
    Thank you,
    AJ

    No, no, you guys misunderstand me. I am not that much of an oblivious person. 95% of the time I understand EXACTLY what the code that I am copying and pasting does. And when I don't, I look into it further before executing said commands. I just tend to not remember commands so I google them, see examples, and then copy and paste them to avoid the busy work of typing out long strings. For example, it took me like 6 months to remember that to untar a .tar.gz file it was -xvfz.
    But I digress. drcouzelis, I do have root access. It's my own VPS. However, I have always used shared hosting through different hosting providers and now that I got a VPS and have to do everything myself, I am a little bit lost.
    I followed what wonderwoofy said and created a www-data group, added the adriano user to said group, and changed the owner of my http server root to www-data, and I SFTPed into the server again with filezilla and it still works perfectly. However, those "hordes of hackers" drcouzelis warned me about does not sound pleasant so I am really really really hoping one of you guys can tell me the next steps. Root login is disabled in the /etc/ssh/sshd_config file, and I also changed the port to a random port I created. My web files are all served from /usr/share/nginx/ (there are different folders in there that correspond to different domains.) Now what I am wondering is that if user "adriano" is in the sudoers file as ALL=(ALL) ALL, doesn't that pretty make adriano the same as the root user? The reason why I am so worried about this is because I heard/read countless times that working through the root user is BADDDDDDDDDD and will bring evil and shame upon your life (not in those exact words) and that you should never work with it. Also, do I have to worry about anything dealing with groups and/or users and/or permissions when it comes to PHP? I have php-fpm installed.
    I am willing to buy anyone who can help me out with this a beer or two and I will be forever in your debt.
    Thank you,
    AJ
    Last edited by AJCR (2013-05-23 02:52:03)

  • How to trace changes in directories and files in windows using java.

    Hi,
    Want to know how to trace changes in directories and files in windows using java.
    I need to create a java procedure that keeps track of any changes done in any directory and its files on a windows System and save this data.
    Edited by: shruti.ggn on Mar 20, 2009 1:56 AM

    chk out the bellow list,get the xml and make the procedure.....     
         Notes          
    1     Some of the similar software’s include HoneyBow, honeytrap, honeyC, captureHPC, honeymole, captureBAT, nepenthes.     
    2     Some of the other hacking software’s include keyloggers. Keyloggers are used for monitoring the keystrokes typed by the user so that we can get the info or passwords one is typing. Some of the keyloggers include remote monitoring capability, it means that we can send the remote file across the network to someone else and then we can monitor the key strokes of that remote pc. Some of the famous keyloggers include win-spy, real-spy, family keylogger and stealth spy.          
    3     Apart from theses tools mentioned above there are some more tools to include that are deepfreeze, Elcomsoft password cracking tools, Online DFS, StegAlyzer, Log analysis tools such as sawmill, etc.

  • Process for setting up new directories and files on Unix

    I am trying to document a process �Process for setting up new directories and files on Unix batch servers�.
    Developer will be developing project on Windows and I need tell them as well as QA team how the Unix directory and file structure.
    Please let me know how is the process in Unix on AIX.
    If I get some documentation regarding this it will be useful.
    Thanks in advance
    Regards
    San

    well on unix/Linux/solaris there are no drives but storage heirarchy starts with a root directory represented with ' / '. and all files and directories are created in root directoy like
    /usr/local/bin
    /export/home/san
    etc
    also filesystem of unix consists iNodes rathar than FAT entries as in case of Windows.
    some basic information is available at
    http://www.techonthenet.com/unix/index.php
    Regards

  • Order of directories and files listed by the ls command

    Per default, the "ls" command lists directories and non-directories separately in lexicographical order.
    Is there a possibility to change that order of listing and sorting?
    For example, if I want "ls" to list my directories and files not by name but by change date +per default+ without using any additional options, what will I have to do?
    Is there a command or a setting which influcenes "ls"'s order of sorting?

    I don't think the defaults for ls can be changed as it is a compiled binary located in /bin. Besides compiling your own version of ls, one solution is to add lines such as the following to /etc/profile or (presuming you're using BASH) ~/.bash_profile and opening a new Terminal window:
    alias l="ls -l"
    alias ll="ls -la"
    I have two such lines in my own profile so that when I type "l" followed by the return key I get the output of "ls -l" and issuing "ll" gives me a listing of dot-files, too.
    Probably not exactly what you were looking for but it does simplify the command issued at the command line and avoid compiling your own.
    hth,
    Johnnie Wilcox
    aka mistersquid

  • FM to get list of all directories and files on application server..

    Hi All,
    Can anyone tel me FM to get list of all directories and files on application server..i know 'F4_DXFILENAME_TOPRECURSION'
    and '/SAPDMC/LSM_F4_SERVER_FILE' these are working too...but my requirement is when i click F4 i should get list of directories and whn i select one of these the only directory name should display.....and whn click again for 2nd text box field i want file name ...means directory name in one text box field and file name in another....plz help me out..
    helpful answers wil b awarded.
    Thanks,
    Jayshree

    Hi Jayashree
    Please check this FM, SUBST_GET_FILE_LIST. Pass the file path and file name, if it returns an entry in table FILE_LIST, then the filename and path are valid.
    Hope this helps !
    ~ Ranganath

  • Where, on my macbook pro, should I save created documents and files

    Where, on my macbook pro, should I save created documents and files?

    The usual place is to the hard drive in folders under your user name. The following may have something regarding Finder that will help you understand how it works: Mac Basics: The Finder organizes all of your files - Apple Support

  • Sharing directories and files with multiple users

    I have 4 users (family members) on my machine. Up until recently, I only had one account, mine. Now my wife and kids each have an account. The kids do not have admin access. I have several firewire drives, and lately I've been moving most of my documents and other files (photoshop, etc) to a directory on my firewire drive. Then, I've added symbolic links to them from their home directories. Of course, I've had to open up permissions (rwxrwxrwx) on the files and directories. Of course, when one of them creates a file, it will use their umask to create the new files, and then the others won't have access to the new file until I reset the permissions again.
    Is there a way to say, in this folder and below, always use this permission mask? Or, is there a way for me to set their umaks. For my account I can do that, since I have a .bashrc file, but for the other accounts I don't see a .bashrc or .bash_properties or anything where I can but the umask.
    Is this even the best way to go? Any suggestions would be appreciated. How do others do this type of thing?
    Thanks,
    Alfredo

    Alfredo, I think Kurt's example, '1 2 3 4 *", was just to show the place holders. I think you can set up a root crontab by entering sudo crontab -e (if you know how to use vi), or you can do sudo tcsh (or sudo bash) and then do the echo statement as in Kurt's reply.
    And yes you can have multiple commands on the same line like you suggested.
    Here's an example I used in the past:
    00 8,12,16,20 * * * (date && /usr/local/bin/myscript) >> /usr/local/logs/myscript.log 2>&1
    This directs the output and the error output to a log file so I can check on the results periodically. The "&&" between the two commands keeps the second command from running if the first one fails.
    Boyd

  • Need help creating folders and files in Pathfinder

    Hi, I have tried the Pathfinder forum but it's a ghost town over there. I don't know if this is a PF or Finder issue yet.
    I've just installed Pathfinder 5.2.2 on an iMac running OS 10.5.8 at my new job.
    The problem is I can open files and folders from within Pathfinder but I can't create any new files or folders from within Pathfinder, and I also can't drag anything from the drop stack to a new location either. I've made sure to set permissions for read/write on my Mac HD and on the PF application itself, and I've repaired my permissions, and also run Cocktail, restarted the mac, quit PF etc. Still nothing.
    Anything that could point me in the right direction would be greatly appreciated.

    Hi Kappy,
    When I try to move a folder or file, or create one, nothing happens at all. It's as if I never did anything. I am able to open files from within Pathfinder and navigate my Hard Drive, but I cannot create or delete files.
    I posted on their forum, which is what they suggest. I've used Pathfinder for several years, I have no questions on the actual interface, but I wonder if there might be a permissions issue on this particular mac.

  • Include all sub-directories and files?

    I did search, so don't complain that this has been asked a billion times.
    I am using Automator to replace text for files and folders. But this only works with the files and or folders I select, it doesn't do it with the sub-directories and sub-files. How can I config. Automator to do this?
    Thanks.

    The various actions operate on whatever is input to them. If you are referring to the *Rename Finder Items* action, you can use the *Get Folder Contents* action to go into sub folders, but be careful, since this action will go into bundles/packages such as applications and RTFD files.

  • DIrectories and Files deleted on Snow Leopard upgrade from 10.5.8

    We had a directory with sub folders in the /Volumes directory. When we upgraded snowleopard the directory and files were deleted. Why no warning and why were they deleted? I understand that the /Volumes directory is used as a mount point for external drives etc...,  but why would the upgrade delete files in that directory or better yet why would it allow you to even create an actual directory with files below it if you were not supposed to store files there.  It was a loss  of 40GB or 3.5 years of data. We also found that Time Machine or Carbon Copy do not back up that directory as well.
    Is this a bug related to the permission changes involving UID, GID 200 or what? Why don't backup utilities pick up the files in the /Volumes dir?

    What I do not understand is why a regular directory with files stored in it  under the  /Volumes directory would be deleted when upgraded.
    I realize that you don't understand it. I don't know how I can explain any more clearly than I already have, that it's a reserved directory. If you have anything in that directory other than the automatically-created mountpoint for a local volume or a remote AFP volume, then your system is in an inconsistent state. A potential mountpoint exists, but it's not in use. That should never happen. The Disk Arbitration framework must always be free to create or remove a mountpoint in /Volumes with any name required. Otherwise it won't be able to function as the user expects.
    If a system installation does anything at all, it must leave the system in a consistent state, which means that it must delete the extraneous files from /Volumes. I repeat that I'm sorry you experienced a loss of data due to this misunderstanding. Arguably the Installer should have moved the files to a safe location instead of deleting them, but to be honest, I doubt that it occurred to anyone at Apple that something like this might happen. They took precautions to keep users from tampering with the /Volumes directory.

  • Searching Directories and Files in Application Server

    Hi All,
    I need a function module that will give me all FOLDERS, SUBFOLDERS and FILES in an application server.
    So far function modules like RZL_READ_DIR_LOCAl, SUBST_GET_FILE_LIST and EPS_GET_DIRECTORY_LISTING can only work if I specify at least one folder name after the server IP.
    I wanted the folder names to be searched dynamically by passing only server IP.
    This is for a background program.
    Please help
    Thanks in advance.
    Regards,
    Lily

    Done.

  • Lotus Notes - Create .pdf and file size limits

    Is there a way to increase the 100MB file size limit in Lotus Notes create .pdf option?

    Good day Lisa,
    Are you using Adobe Acrobat to create your PDF files or are you looking to use our CreatePDF service?  If you're trying to use the CreatePDF service, I'm sorry, but we can't change the 100MB file size limit.
    Kind regards,
    David

  • Need to verify my directories and files are in good order

    I am not sure my directory and files are in good order. Need to be sure they are configured correctly.

    Use Disk Utility - it's in your Mac's Utilities folder.
    Select the startup volume, then click the Verify Disk button. If it finds any errors it reports in red, describe them.

  • Zipping  and Unzipping Directories and files both - URGENT PLEASE

    Hi friend,
    I tried for zipping and unzipping but it is not working still.
    and have to submit project tomorrow.
    so please as possible as fast just send me the source code that zip the file/folder and unzip in the same way as it was stored.
    ex : if we zip file c:/temp/myfolder/myfile.ppt to .zip
    unzip should c:/temp/myfolder/myfile.ppt
    thanks
    ghanshyam
    9879152949

    I believe (although I don't want to put words in his mouth) that Madan has run across a similar problem that I am trying to solve.
    For instance if I have the following files:
    c:\pic1.gif
    c:\pic2.gif
    c:\pic3.gifand I zip them in to a file called: pics.zip the will unzip just fine.
    However, if I have them in a directory:
    c:\pics\pic1.gif
    c:\pics\pic2.gif
    c:\pics\pic3.gifA listing of the zip files (all using java of-course) will show the files and dirs correctly:
    \pics\pic1.gif
      \pics\pic2.gif
      \pics\pic3.gifbut will give the following error if you try to un-zip them:
    "The system cannot find the path specified"The ZipEntry class has an 'isDirectory()' method, but it only returns true in the case of an EMPTY directory. If , as in my example, there is an actual file at the end of the entry, it returns false.
    So, at least in my case, I would be looking for advice on how to expand files that reside in directories within the zip file.
    Thank You for any help you can provide

Maybe you are looking for

  • Unable to capture new KUNNR in Exits from XD01

    Hi all, I am creating a new customer in XD01 and trying to capture the new customer number in an EXIT. Here, the customer number is (internally)automatically generated as a result of which this customer number cannot be captured in the exit. I am usi

  • How can I access the address file with all contact info and print it?

    i'd like to be able to print out address info, phone no.s, etc but not do that one contact at a time so I'm looking for a file that might have all the contact info available in one place that I can access.

  • IS RETAIL ACTIVATION IN ECC 6.0

    Dear All, Please guide 1. How to activate retail system in ECC 6.0 and 2. What are the differences after activating Retail and 3. Any other settings required in customization . Regards, Vikas

  • Getting insert black dvd message when trying to back up but.....

    I don't have a dvd burner and i only want the music so how do i back up just my music and not the podcasts or tv shows? HP   Windows 2000  

  • No audio in canvas preview

    Can anyone tell me why i have no audio when i try yo preview my project. If I drag the bar on the timeline there is audio but not when I press play in the canvas preview, just beeps. Thanks